revert between 56095 -> 55830 in arch
[AROS.git] / workbench / tools / Edit / Gui.h
blobb35574022c46f11ade71257e0637c972e5c2c28a
1 /**************************************************************
2 **** gui.h: datatypes of main interface. ****
3 **** Free software under GNU license, written in 3/1/2000 ****
4 **** © T.Pierron, C.Guillaume. ****
5 **************************************************************/
7 #ifndef GUI_H
8 #define GUI_H
10 #ifdef INTUITION_INTUITION_H /* Reduce includes required */
11 struct Scroll
13 struct Gadget scroller; /* proportionnal gadget */
14 struct Gadget down; /* down gadget */
15 struct Gadget up; /* up gadget */
16 struct PropInfo pinfo; /* PropInfo for scroller */
17 struct Image simage; /* image for scroller */
18 struct Image * upimage; /* Boopsi image for up arrow */
19 struct Image * downimage; /* ditto for down arrow */
22 /** This very looooong names are quite boring to write... **/
23 #define GetSI( gad ) ((struct StringInfo *)gad->SpecialInfo)
25 #endif
27 /*** Global variables common to all projects ***/
28 struct gv
30 UWORD left, top; /* Upper left corner of edit area */
31 UWORD right, bottom; /* Bottom right corner */
32 UWORD nbline, nbcol; /* Nb. of visible lines/columns */
33 UWORD topcurs, botcurs; /* Max positions before to scroll */
34 UBYTE xsize, ysize, basel; /* Font size */
35 UWORD rcurs, xstep; /* Right-most window pos of cursor */
36 UBYTE txtmask, selmask; /* Mask to optimize scrolling */
37 UBYTE depthwid; /* Depth-arrange image width */
38 UWORD oldtop; /* Top change if project bar is added */
39 UWORD xinfo, yinfo; /* Position of line/col [INS|OVR] marker */
42 /*** Pens number to render editor ***/
43 struct pens
45 WORD bg, fg; /* Foreground & background normal text pens */
46 WORD bgfill,fgfill; /* Dito with selected text pens */
47 WORD bgbar, fgbar; /* Left margin background & foreground */
48 WORD shine, shade; /* Shine & shadow pens for project bar */
49 WORD bgpan, fgpan; /* Foreground & background panel pens */
50 WORD panel, abpan; /* Project bar glyph & activ bg panel */
53 extern struct Screen * Scr;
54 extern APTR Vi;
55 extern struct Window * Wnd;
56 extern struct Menu * Menu;
57 extern struct Scroll * Prop;
58 extern struct RastPort *RP,RPT;
59 extern struct gv gui;
60 extern struct pens pen;
61 struct _project;
63 long setup ( void );
64 void load_pens ( void );
65 void free_prop ( struct Scroll * );
66 void adjust_win ( struct Window *, BYTE PrjBar );
67 struct Scroll * add_prop ( struct Window * );
68 CONST_STRPTR GetMenuText ( ULONG );
69 void prop_adj ( struct _project *p);
70 void clear_brcorner( void );
71 void CloseMainWnd( BOOL );
72 void recalc_sigbits(void);
74 /*** Easy access to commonly used variables: ***/
75 #define YSIZE (gui.ysize)
76 #define XSIZE (gui.xsize)
77 #define BASEL (gui.basel)
79 #endif