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

Last change on this file since 399 was 387, checked in by dmik, 12 years ago

Added SBM_SETSPLITTERSIZE and SBM_GETSPLITTERSIZE to WM_ER_SPLITTER class.

File size: 6.2 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// SetSplitterSize - Set the width of the splitter bar in pixels
62//                   (-1 resets to the default)
63#define SBM_SETSPLITTERSIZE (WM_USER+6)
64// SHORT splitterSize;
65// (BOOL)WinSendMsg( hwnd, SBM_SETSPLITTERSIZE,
66//                   MPFROMSHORT( splitterSize ), MPVOID );
67
68// GetSplitterSize - Get the width of the splitter bar in pixels
69#define SBM_GETSPLITTERSIZE (WM_USER+7)
70// (SHORT)WinSendMsg( hwnd, SBM_GETSPLITTERSIZE, MPVOID, MPVOID );
71
72// Control notification code, splitter pos changed
73// MP1 - (id, SBN_POSITIONCHANGED)  MP2 - (newpos, oldpos)
74#define SBN_POSITIONCHANGED     1
75
76/*****************************************************/
77/*                   Toolbar                         */
78/*****************************************************/
79
80// ¥£šáâà æšï ª« áá  Toolbar
81
82BOOL InitPMToolbarClass( HAB hab );
83
84#define WC_ER_TOOLBAR "er.toolbar.class"
85
86#define DEFAULT_PICTSIZE        20
87//#define DEFAULT_PICTSIZE        40
88#define TOOLBAR_HEIGHT_ADD      8
89
90
91// Toolbar messages
92
93// AddButton - €®¡ ¢«ï¥â ª­®¯ªã ­  âã«¡ à
94#define TBM_ADDBUTTON       (WM_USER+1)
95// AddBtnStruct *bs;
96// WinSendMsg( hwnd, TBM_ADDBUTTON, (MPARAM)bs, MPVOID );
97
98// AddSeparator - €®¡ ¢«ï¥â ¯®«®áªã/à §€¥«šâ¥«ì ­  âã«¡ à
99#define TBM_ADDSEPARATOR    (WM_USER+2)
100// WinSendMsg( hwnd, TBM_ADDSEPARATOR, MPVOID, MPVOID );
101
102// QueryCheck - ¯à®¢¥àï¥â, ­ Š â  «š ª­®¯ª 
103#define TBM_QUERYCHECK      (WM_USER+3)
104// USHORT cmd;
105// (BOOL)WinSendMsg( hwnd, TBM_QUERYCHECK, MPFROMSHORT(cmd), MPVOID );
106
107// SetCheck - ¯¥à¥¢®€šâ ª­®¯ªã ¢ ­ Š â®¥/®âŠ â®¥ á®áâ®ï­š¥
108#define TBM_SETCHECK        (WM_USER+4)
109// USHORT cmd;
110// BOOL checked;
111// WinSendMsg( hwnd, TBM_SETCHECK, MPFROMSHORT(cmd), (MPARAM)checked );
112
113// EnableItem - à §à¥è ¥â/§ ¯à¥é ¥â ª­®¯ªã
114#define TBM_ENABLEITEM      (WM_USER+5)
115// USHORT cmd;
116// BOOL enable;
117// WinSendMsg( hwnd, TBM_ENABLEITEM, MPFROMSHORT(cmd), (MPARAM)enable );
118
119// SetBubbleText - ãáâ ­ ¢«š¢ ¥â ¢á¯«ë¢ îéãî ¯®€áª §ªã
120#define TBM_SETBUBBLETEXT   (WM_USER+6)
121// USHORT cmd;
122// PCSZ text;
123// WinSendMsg( hwnd, TBM_SETBUBBLETEXT, MPFROMSHORT(cmd), MPFROMP(text) );
124
125// SetPictSize - ãáâ ­ ¢«š¢ ¥â à §¬¥à šá¯®«ì§ã¥¬ëå ¡šâ¬ ¯®¢,
126//               ¯® 㬮«ç ­šî 20 (ª àâš­ªš ª¢ €à â­ë¥)
127#define TBM_SETPICTSIZE     (WM_USER+7)
128// USHORT sz;
129// WinSendMsg( hwnd, TBM_SETPICTSIZE, MPFROMSHORT( sz ), MPVOID );
130
131// AddControl - €®¡ ¢«ï¥â ¯à®š§¢®«ì­ë© ª®­â஫ ­  âã«¡ à
132#define TBM_ADDCONTROL      (WM_USER+8)
133// AddCtrlStruct *cs;
134// WinSendMsg( hwnd, TBM_ADDCONTROL, (MPARAM)cs, MPVOID );
135
136// ‘âàãªâãà , šá¯®«ì§ã¥¬ ï ¯àš €®¡ ¢«¥­šš ª­®¯®ª ­  âã«¡ à
137// ¥šá¯®«ì§ã¥¬ë¥ ¯®«ï €®«Š­ë ¡ëâì § ¯®«­¥­ë §­ ç¥­š¥¬ 0 (NULL)
138struct AddBtnStruct
139{
140    USHORT cmd; // Š®¬ ­€ 
141    // ‚ᯫ뢠îéš© ⥪áâ. ‹š¡® 㪠§ â¥«ì ­  áâபã (bubbleText),
142    // «š¡® áâப  ¢ à¥áãàá å (bubbleRes š bubbleHmod)
143    PSZ bubbleText;
144    USHORT bubbleRes;
145    HMODULE bubbleHmod;
146    // šâ¬ ¯ ¢ à¥áãàá å
147    USHORT pictRes;
148    HMODULE pictHmod;
149    // …á«š ¯àš ­ Š âšš ­  ª­®¯ªã €®«Š­® ¯®ï¢«ïâáï ¬¥­î
150    USHORT menuRes;
151    HMODULE menuHmod;
152
153    BOOL checked; //  Š â  «š ª­®¯ª 
154    BOOL enabled; //  §à¥è¥­  «š ª­®¯ª 
155};
156
157// ‘âàãªâãà , šá¯®«ì§ã¥¬ ï ¯àš €®¡ ¢«¥­šš ª®­â஫®¢ ­  âã«¡ à
158// ¥šá¯®«ì§ã¥¬ë¥ ¯®«ï €®«Š­ë ¡ëâì § ¯®«­¥­ë §­ ç¥­š¥¬ 0 (NULL)
159struct AddCtrlStruct
160{
161    HWND ctrlHandle; // HWND ª®­â஫ 
162    SHORT cx;        // ˜šàš­  ª®­â஫ 
163    SHORT cy;        // ­®«ì «š¡® §­ ç¥­š¥ ¬¥­ìè¥ ­ã«ï
164                     // ¥á«š <0 - â® ª®­â஫ ¡ã€¥â ¯à®€«ñ­ ¢­š§ (for combobox)
165    // ‚ᯫ뢠îéš© ⥪áâ. ‹š¡® 㪠§ â¥«ì ­  áâபã (bubbleText),
166    // «š¡® áâப  ¢ à¥áãàá å (bubbleRes š bubbleHmod)
167    PSZ bubbleText;
168    USHORT bubbleRes;
169    HMODULE bubbleHmod;
170};
171
172//
173// àš¬¥ç ­šï:
174//
175// - àš àšá®¢ ­šš ¡šâ¬ ¯  «¥¢ë© ­šŠ­š© ¯šªá¥«ì § € ñ⠯஧à ç­ë© 梥â.
176//
177// -   ­¥ª®â®àëå áâ àëå ¢š€¥®€à ©¢¥à å àšá®¢ ­š¥ á ¯à®§à ç­®áâìî
178//   ­¥ à ¡®â ¥â. Š àâš­ª  «š¡® çñà­ ï, «š¡® ¡¥§ ¯à®§à ç­®áâš, «š¡®
179//   ášá⥬  ¢¥è ¥âáï. ‚ í⮬ á«ãç ¥ €®¡ ¢ì⥠¢ CONFIG.SYS áâபã
180//   SET ERTOOLBARSAFEDRAW=1 - ¡ã€¥â šá¯®«ì§®¢ âìáï ¬¥€«¥­­®¥
181//   ¯®¯šªá¥«ì­®¥ àšá®¢ ­š¥.   SDD/SNAP àšá®¢ ­š¥ á ¯à®§à ç­®áâìî
182//   ¢á¥£€  à ¡®â ¥â ª®à४⭮.
183//
184
185#endif //__TB_SPL_H
186
Note: See TracBrowser for help on using the repository browser.