- Now puts cursor position in window title properly instead of overwriting
[tangerine.git] / workbench / tools / Edit / Gui.h
blob3b4aea18768088f438f29fa284a6d19f269fb91f
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;
62 long setup ( void );
63 void load_pens ( void );
64 void free_prop ( struct Scroll * );
65 void adjust_win ( struct Window *, BYTE PrjBar );
66 struct Scroll * add_prop ( struct Window * );
67 CONST_STRPTR GetMenuText ( ULONG );
68 void prop_adj ( Project );
69 void clear_brcorner( void );
70 void CloseMainWnd( BOOL );
71 void recalc_sigbits(void);
73 /*** Easy access to commonly used variables: ***/
74 #define YSIZE (gui.ysize)
75 #define XSIZE (gui.xsize)
76 #define BASEL (gui.basel)
78 #endif