2 /**************************************************************************
3 ** (c) Copyright 1998, Andromeda Technology & Automation
4 ***************************************************************************
5 ** MODULE INFORMATION *
6 ***********************
8 ** SYSTEM NAME : AXE - Andromeda X-windows Encapsulation
9 ** VERSION NUMBER : $Revision: 1.1 $
11 ** DESCRIPTION : Definition of the frame class
16 ***************************************************************************
17 ** ADMINISTRATIVE INFORMATION *
18 ********************************
19 ** ORIGINAL AUTHOR : Arjen Baart - arjen@andromeda.nl
20 ** CREATION DATE : Mar 06, 1998
21 ** LAST UPDATE : Mar 13, 1998
23 **************************************************************************/
25 /*****************************
27 Revision 1.1 2002-07-25 08:01:27 arjen
28 First checkin, AXE release 0.2
30 *****************************/
32 /* static const char *RCSID = "$Id: frame.h,v 1.1 2002-07-25 08:01:27 arjen Exp $"; */
41 ///////////////////////////////////////////////////////////////////////////
42 // NAME : frame - window with border effect and aligned text
44 // MEMBERS : text : The text to draw in the frame (may be 0).
45 // valign : Vertical alignment of the text
46 // halign : Horizontal alignment of the text.
47 // effect : Type of border: 3D, Shadow, etc
48 // strength : Of the border effect. 0 = no effect,
49 // positive means 'Up'; negative is 'Down'
52 // METHODS : PRIVATE draw_effect() : Draw border effect
53 // PRIVATE place_text() : Draw the aligned text
55 // TextAlign() : Set aligment of the text
56 // Strength() : Change or read the strength of the effect.
58 // DESCRIPTION : A frame adds two visual effects to a window:
59 // 1. A border effect (3D or shadow)
60 // 2. An aligned line of text.
65 ///////////////////////////////////////////////////////////////////////////
68 enum hor_alignment { Left, Center, Right };
69 enum ver_alignment { Top, Middle, Bottom };
71 class frame : public window
78 enum { TriD, Shadow } effect;
82 void draw_effect(void);
84 void place_text(void);
86 virtual int EV_Expose(XExposeEvent ev);
90 frame(window &par, int x, int y, int s = 3) : window(par, x, y, 80, 30)
92 Background(inside_3D);
98 SelectInput(ExposureMask, 1);
101 frame(window &par, int x, int y, const char t[]) : window(par, x, y, 80, 30)
103 Background(inside_3D);
109 SelectInput(ExposureMask, 1);
112 void TextAlign(hor_alignment hor, ver_alignment ver)
129 virtual void redraw(void)