source: trunk/Lucide/gui/tb_spl.h @ 367

Last change on this file since 367 was 367, checked in by dmik, 11 years ago

Merged bramches/kmk (r294:365) to trunk.

File size: 5.8 KB
Line 
1#ifndef __TB_SPL_H
2#define __TB_SPL_H
3
4/*
5 *  PM Splitter and Toolbar interface.
6 *  by Eugene Romanenko
7 *
8 *  This code is in the public domain and has no copyright.
9 */
10
11// Toolbar and splitter definitions
12
13/*****************************************************/
14/*                   Splitter                        */
15/*****************************************************/
16
17// ¥£šáâà æšï ª« áá  Splitter
18BOOL InitPMSplitterClass( HAB hab );
19
20#define WC_ER_SPLITTER "er.splitter.class"
21
22// Splitter window style definitions
23#define SBS_VSPLIT          0x00000001L   // Vertical splitter
24#define SBS_HSPLIT          0x00000002L   // Horizontal splitter
25#define SBS_FIRSTFIXED      0x00000004L   // First window with fixed size
26#define SBS_SECONDFIXED     0x00000008L   // Second window with fixed size
27#define SBS_FIXED           (SBS_FIRSTFIXED|SBS_SECONDFIXED) // both fixed
28
29// Splitter messages
30
31// SetWindows - 㪠§ë¢ ¥â ®ª­  ª®â®àë¥ ¡ã€ãâ à §€¥«¥­ë ᯫšââ¥à®¬
32#define SBM_SETWINDOWS      (WM_USER+1)
33// HWND firstWindow;
34// HWND secondWindow;
35// (BOOL)WinSendMsg( hwnd, SBM_SETWINDOWS,
36//              MPFROMHWND( firstWindow ), MPFROMHWND( secondWindow ) );
37
38// SetSplitterPos - 㪠§ë¢ ¥â ¯®§šæšî ᯫšââ¥à 
39#define SBM_SETSPLITTERPOS  (WM_USER+2)
40// SHORT splitterPos;
41// (BOOL)WinSendMsg( hwnd, SBM_SETSPLITTERPOS,
42//                   MPFROMSHORT( splitterPos ), MPVOID );
43
44// GetSplitterPos - ¢®§¢à é ¥â ¯®§šæšî ᯫšââ¥à 
45#define SBM_GETSPLITTERPOS  (WM_USER+3)
46// (SHORT)WinSendMsg( hwnd, SBM_GETSPLITTERPOS, MPVOID, MPVOID );
47
48// SetPointers - 㪠§ âì šá¯®«ì§ã¥¬ë¥ ¬ëèš­ë¥ ¯®š­â¥àë.
49//               ¯® 㬮«ç ­šî šá¯®«ì§ãîâáï
50//               ášá⥬­ë¥ SPTR_SIZEWE š SPTR_SIZENS
51#define SBM_SETPOINTERS     (WM_USER+4)
52// HPOINTER ptrWE;
53// HPOINTER ptrNS;
54// (BOOL)WinSendMsg( hwnd, SBM_SETPOINTERS, (MPARAM)ptrWE, (MPARAM)ptrNS );
55
56// SetFixedSize - 㪠§ âì 䚪ášà®¢ ­­ë© à §¬¥à
57#define SBM_SETFIXEDSIZE    (WM_USER+5)
58// SHORT size;
59// (BOOL)WinSendMsg( hwnd, SBM_SETFIXEDSIZE, MPFROMSHORT( size ), MPVOID );
60
61// Control notification code, splitter pos changed
62// MP1 - (id, SBN_POSITIONCHANGED)  MP2 - (newpos, oldpos)
63#define SBN_POSITIONCHANGED     1
64
65/*****************************************************/
66/*                   Toolbar                         */
67/*****************************************************/
68
69// ¥£šáâà æšï ª« áá  Toolbar
70
71BOOL InitPMToolbarClass( HAB hab );
72
73#define WC_ER_TOOLBAR "er.toolbar.class"
74
75#define DEFAULT_PICTSIZE        20
76//#define DEFAULT_PICTSIZE        40
77#define TOOLBAR_HEIGHT_ADD      8
78
79
80// Toolbar messages
81
82// AddButton - €®¡ ¢«ï¥â ª­®¯ªã ­  âã«¡ à
83#define TBM_ADDBUTTON       (WM_USER+1)
84// AddBtnStruct *bs;
85// WinSendMsg( hwnd, TBM_ADDBUTTON, (MPARAM)bs, MPVOID );
86
87// AddSeparator - €®¡ ¢«ï¥â ¯®«®áªã/à §€¥«šâ¥«ì ­  âã«¡ à
88#define TBM_ADDSEPARATOR    (WM_USER+2)
89// WinSendMsg( hwnd, TBM_ADDSEPARATOR, MPVOID, MPVOID );
90
91// QueryCheck - ¯à®¢¥àï¥â, ­ Š â  «š ª­®¯ª 
92#define TBM_QUERYCHECK      (WM_USER+3)
93// USHORT cmd;
94// (BOOL)WinSendMsg( hwnd, TBM_QUERYCHECK, MPFROMSHORT(cmd), MPVOID );
95
96// SetCheck - ¯¥à¥¢®€šâ ª­®¯ªã ¢ ­ Š â®¥/®âŠ â®¥ á®áâ®ï­š¥
97#define TBM_SETCHECK        (WM_USER+4)
98// USHORT cmd;
99// BOOL checked;
100// WinSendMsg( hwnd, TBM_SETCHECK, MPFROMSHORT(cmd), (MPARAM)checked );
101
102// EnableItem - à §à¥è ¥â/§ ¯à¥é ¥â ª­®¯ªã
103#define TBM_ENABLEITEM      (WM_USER+5)
104// USHORT cmd;
105// BOOL enable;
106// WinSendMsg( hwnd, TBM_ENABLEITEM, MPFROMSHORT(cmd), (MPARAM)enable );
107
108// SetBubbleText - ãáâ ­ ¢«š¢ ¥â ¢á¯«ë¢ îéãî ¯®€áª §ªã
109#define TBM_SETBUBBLETEXT   (WM_USER+6)
110// USHORT cmd;
111// PCSZ text;
112// WinSendMsg( hwnd, TBM_SETBUBBLETEXT, MPFROMSHORT(cmd), MPFROMP(text) );
113
114// SetPictSize - ãáâ ­ ¢«š¢ ¥â à §¬¥à šá¯®«ì§ã¥¬ëå ¡šâ¬ ¯®¢,
115//               ¯® 㬮«ç ­šî 20 (ª àâš­ªš ª¢ €à â­ë¥)
116#define TBM_SETPICTSIZE     (WM_USER+7)
117// USHORT sz;
118// WinSendMsg( hwnd, TBM_SETPICTSIZE, MPFROMSHORT( sz ), MPVOID );
119
120// AddControl - €®¡ ¢«ï¥â ¯à®š§¢®«ì­ë© ª®­â஫ ­  âã«¡ à
121#define TBM_ADDCONTROL      (WM_USER+8)
122// AddCtrlStruct *cs;
123// WinSendMsg( hwnd, TBM_ADDCONTROL, (MPARAM)cs, MPVOID );
124
125// ‘âàãªâãà , šá¯®«ì§ã¥¬ ï ¯àš €®¡ ¢«¥­šš ª­®¯®ª ­  âã«¡ à
126// ¥šá¯®«ì§ã¥¬ë¥ ¯®«ï €®«Š­ë ¡ëâì § ¯®«­¥­ë §­ ç¥­š¥¬ 0 (NULL)
127struct AddBtnStruct
128{
129    USHORT cmd; // Š®¬ ­€ 
130    // ‚ᯫ뢠îéš© ⥪áâ. ‹š¡® 㪠§ â¥«ì ­  áâபã (bubbleText),
131    // «š¡® áâப  ¢ à¥áãàá å (bubbleRes š bubbleHmod)
132    PSZ bubbleText;
133    USHORT bubbleRes;
134    HMODULE bubbleHmod;
135    // šâ¬ ¯ ¢ à¥áãàá å
136    USHORT pictRes;
137    HMODULE pictHmod;
138    // …á«š ¯àš ­ Š âšš ­  ª­®¯ªã €®«Š­® ¯®ï¢«ïâáï ¬¥­î
139    USHORT menuRes;
140    HMODULE menuHmod;
141
142    BOOL checked; //  Š â  «š ª­®¯ª 
143    BOOL enabled; //  §à¥è¥­  «š ª­®¯ª 
144};
145
146// ‘âàãªâãà , šá¯®«ì§ã¥¬ ï ¯àš €®¡ ¢«¥­šš ª®­â஫®¢ ­  âã«¡ à
147// ¥šá¯®«ì§ã¥¬ë¥ ¯®«ï €®«Š­ë ¡ëâì § ¯®«­¥­ë §­ ç¥­š¥¬ 0 (NULL)
148struct AddCtrlStruct
149{
150    HWND ctrlHandle; // HWND ª®­â஫ 
151    SHORT cx;        // ˜šàš­  ª®­â஫ 
152    SHORT cy;        // ­®«ì «š¡® §­ ç¥­š¥ ¬¥­ìè¥ ­ã«ï
153                     // ¥á«š <0 - â® ª®­â஫ ¡ã€¥â ¯à®€«ñ­ ¢­š§ (for combobox)
154    // ‚ᯫ뢠îéš© ⥪áâ. ‹š¡® 㪠§ â¥«ì ­  áâபã (bubbleText),
155    // «š¡® áâப  ¢ à¥áãàá å (bubbleRes š bubbleHmod)
156    PSZ bubbleText;
157    USHORT bubbleRes;
158    HMODULE bubbleHmod;
159};
160
161//
162// àš¬¥ç ­šï:
163//
164// - àš àšá®¢ ­šš ¡šâ¬ ¯  «¥¢ë© ­šŠ­š© ¯šªá¥«ì § € ñ⠯஧à ç­ë© 梥â.
165//
166// -   ­¥ª®â®àëå áâ àëå ¢š€¥®€à ©¢¥à å àšá®¢ ­š¥ á ¯à®§à ç­®áâìî
167//   ­¥ à ¡®â ¥â. Š àâš­ª  «š¡® çñà­ ï, «š¡® ¡¥§ ¯à®§à ç­®áâš, «š¡®
168//   ášá⥬  ¢¥è ¥âáï. ‚ í⮬ á«ãç ¥ €®¡ ¢ì⥠¢ CONFIG.SYS áâபã
169//   SET ERTOOLBARSAFEDRAW=1 - ¡ã€¥â šá¯®«ì§®¢ âìáï ¬¥€«¥­­®¥
170//   ¯®¯šªá¥«ì­®¥ àšá®¢ ­š¥.   SDD/SNAP àšá®¢ ­š¥ á ¯à®§à ç­®áâìî
171//   ¢á¥£€  à ¡®â ¥â ª®à४⭮.
172//
173
174#endif //__TB_SPL_H
175
Note: See TracBrowser for help on using the repository browser.