1 /********************************************************************************
2 *                                                                               *
3 *                               Test Splitter Window                            *
4 *                                                                               *
5 *********************************************************************************
6 * Copyright (C) 1997,2006 by Jeroen van der Zijp.   All Rights Reserved.        *
7 *********************************************************************************
8 * $Id: splitter.cpp,v 1.35 2006/01/22 17:59:02 fox Exp $                        *
9 ********************************************************************************/
10 #include "fx.h"
11 #include <stdio.h>
12 #include <stdlib.h>
13 
14 #include "FXFoldingList.h"
15 
16 /*******************************************************************************/
17 
18 /* Generated by reswrap from file minidoc1.gif */
19 const unsigned char minidoc1[]={
20   0x47,0x49,0x46,0x38,0x37,0x61,0x10,0x00,0x10,0x00,0xf1,0x00,0x00,0xbf,0xbf,0xbf,
21   0x00,0x00,0x00,0xff,0xff,0xff,0x7f,0x7f,0x7f,0x2c,0x00,0x00,0x00,0x00,0x10,0x00,
22   0x10,0x00,0x00,0x02,0x39,0x84,0x8f,0x89,0xc1,0x1d,0x7a,0x82,0x98,0x93,0x41,0x20,
23   0x87,0x16,0xf2,0x29,0x49,0x71,0xcd,0x27,0x68,0x9b,0x16,0x0c,0x09,0x18,0x56,0xea,
24   0x52,0x9a,0x5b,0xba,0xb6,0x14,0x0d,0xcb,0xf3,0x1b,0xd9,0x6e,0xad,0x1b,0x70,0x78,
25   0x06,0x56,0x0b,0x17,0x71,0x28,0x89,0x86,0xa0,0xec,0x02,0x05,0x14,0x00,0x00,0x3b
26   };
27 
28 /* Generated by reswrap from file minifolderopen.gif */
29 const unsigned char minifolderopen[]={
30   0x47,0x49,0x46,0x38,0x37,0x61,0x10,0x00,0x10,0x00,0xf2,0x00,0x00,0xb2,0xc0,0xdc,
31   0x00,0x00,0x00,0x7f,0x7f,0x7f,0xff,0xff,0xff,0xd9,0xd9,0xd9,0xff,0xff,0x00,0x00,
32   0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x03,
33   0x42,0x08,0xba,0xdc,0x2c,0x10,0xba,0x37,0x6a,0x15,0x13,0x88,0x41,0x4a,0x27,0x43,
34   0x14,0x29,0x9b,0x67,0x82,0x56,0x18,0x68,0xdc,0xe9,0x12,0x42,0x20,0xce,0x62,0x11,
35   0x6f,0x69,0x1e,0xc3,0x72,0xfb,0xb9,0xb2,0x18,0xeb,0x47,0xbc,0xad,0x4a,0xc4,0x93,
36   0x6c,0xc5,0x7a,0x99,0x62,0x4c,0x1a,0x2d,0xc0,0x04,0x50,0xaf,0x58,0x6c,0x66,0xcb,
37   0x6d,0x24,0x00,0x00,0x3b
38   };
39 
40 /* Generated by reswrap from file minifolderclosed.gif */
41 const unsigned char minifolderclosed[]={
42   0x47,0x49,0x46,0x38,0x37,0x61,0x10,0x00,0x10,0x00,0xf2,0x00,0x00,0xb2,0xc0,0xdc,
43   0x80,0x80,0x80,0xc0,0xc0,0xc0,0xff,0xff,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0x00,
44   0x00,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x10,0x00,0x10,0x00,0x00,0x03,
45   0x3b,0x08,0xba,0xdc,0x1b,0x10,0x3a,0x16,0xc4,0xb0,0x22,0x4c,0x50,0xaf,0xcf,0x91,
46   0xc4,0x15,0x64,0x69,0x92,0x01,0x31,0x7e,0xac,0x95,0x8e,0x58,0x7b,0xbd,0x41,0x21,
47   0xc7,0x74,0x11,0xef,0xb3,0x5a,0xdf,0x9e,0x1c,0x6f,0x97,0x03,0xba,0x7c,0xa1,0x64,
48   0x48,0x05,0x20,0x38,0x9f,0x50,0xe8,0x66,0x4a,0x75,0x24,0x00,0x00,0x3b
49   };
50 
51 /* Generated by reswrap from file bigfolder.gif */
52 const unsigned char bigfolder[]={
53   0x47,0x49,0x46,0x38,0x37,0x61,0x20,0x00,0x20,0x00,0xf2,0x00,0x00,0xb2,0xc0,0xdc,
54   0x80,0x80,0x80,0xff,0xff,0xff,0xff,0xff,0x00,0xc0,0xc0,0xc0,0x00,0x00,0x00,0x80,
55   0x80,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,0x20,0x00,0x20,0x00,0x00,0x03,
56   0x83,0x08,0xba,0xdc,0xfe,0x30,0xca,0x49,0x6b,0x0c,0x38,0x67,0x0b,0x83,0xf8,0x20,
57   0x18,0x70,0x8d,0x37,0x10,0x67,0x8a,0x12,0x23,0x09,0x98,0xab,0xaa,0xb6,0x56,0x40,
58   0xdc,0x78,0xae,0x6b,0x3c,0x5f,0xbc,0xa1,0xa0,0x70,0x38,0x2c,0x14,0x60,0xb2,0x98,
59   0x32,0x99,0x34,0x1c,0x05,0xcb,0x28,0x53,0xea,0x44,0x4a,0xaf,0xd3,0x2a,0x74,0xca,
60   0xc5,0x6a,0xbb,0xe0,0xa8,0x16,0x4b,0x66,0x7e,0xcb,0xe8,0xd3,0x38,0xcc,0x46,0x9d,
61   0xdb,0xe1,0x75,0xba,0xfc,0x9e,0x77,0xe5,0x70,0xef,0x33,0x1f,0x7f,0xda,0xe9,0x7b,
62   0x7f,0x77,0x7e,0x7c,0x7a,0x56,0x85,0x4d,0x84,0x82,0x54,0x81,0x88,0x62,0x47,0x06,
63   0x91,0x92,0x93,0x94,0x95,0x96,0x91,0x3f,0x46,0x9a,0x9b,0x9c,0x9d,0x9e,0x9a,0x2e,
64   0xa1,0xa2,0x13,0x09,0x00,0x3b
65   };
66 
67 /*******************************************************************************/
68 
69 
70 // Mini application object
71 class SplitterWindow : public FXMainWindow {
72   FXDECLARE(SplitterWindow)
73 protected:
74   FXMenuBar         *menubar;
75   FXMenuPane        *filemenu;
76   FXMenuPane        *modemenu;
77   FXSplitter        *splitter;
78   FXStatusBar       *status;
79   FXVerticalFrame   *group1;
80   FXVerticalFrame   *group2;
81   FXVerticalFrame   *group3;
82   FXGIFIcon         *folder_open;
83   FXGIFIcon         *folder_closed;
84   FXGIFIcon         *doc;
85   FXGIFIcon         *bigdoc;
86 
87 protected:
SplitterWindow()88   SplitterWindow(){}
89 
90 public:
91   long onCmdReverse(FXObject*,FXSelector,void*);
92   long onUpdReverse(FXObject*,FXSelector,void*);
93   long onCmdNormal(FXObject*,FXSelector,void*);
94   long onUpdNormal(FXObject*,FXSelector,void*);
95   long onCmdHorizontal(FXObject*,FXSelector,void*);
96   long onUpdHorizontal(FXObject*,FXSelector,void*);
97   long onCmdVectical(FXObject*,FXSelector,void*);
98   long onUpdVectical(FXObject*,FXSelector,void*);
99   long onCmdTracking(FXObject*,FXSelector,void*);
100   long onUpdTracking(FXObject*,FXSelector,void*);
101 
102 public:
103   enum {
104     ID_REVERSE=FXMainWindow::ID_LAST,
105     ID_NORMAL,
106     ID_HORIZONTAL,
107     ID_VERTICAL,
108     ID_TRACKING,
109     ID_LAST
110     };
111 
112 public:
113   SplitterWindow(FXApp* a);
114   virtual void create();
115   virtual ~SplitterWindow();
116   };
117 
118 
119 
120 /*******************************************************************************/
121 
122 // Map
123 FXDEFMAP(SplitterWindow) SplitterWindowMap[]={
124   FXMAPFUNC(SEL_COMMAND,  SplitterWindow::ID_REVERSE,   SplitterWindow::onCmdReverse),
125   FXMAPFUNC(SEL_UPDATE,   SplitterWindow::ID_REVERSE,   SplitterWindow::onUpdReverse),
126   FXMAPFUNC(SEL_COMMAND,  SplitterWindow::ID_NORMAL,    SplitterWindow::onCmdNormal),
127   FXMAPFUNC(SEL_UPDATE,   SplitterWindow::ID_NORMAL,    SplitterWindow::onUpdNormal),
128   FXMAPFUNC(SEL_COMMAND,  SplitterWindow::ID_HORIZONTAL,SplitterWindow::onCmdHorizontal),
129   FXMAPFUNC(SEL_UPDATE,   SplitterWindow::ID_HORIZONTAL,SplitterWindow::onUpdHorizontal),
130   FXMAPFUNC(SEL_COMMAND,  SplitterWindow::ID_VERTICAL,  SplitterWindow::onCmdVectical),
131   FXMAPFUNC(SEL_UPDATE,   SplitterWindow::ID_VERTICAL,  SplitterWindow::onUpdVectical),
132   FXMAPFUNC(SEL_COMMAND,  SplitterWindow::ID_TRACKING,  SplitterWindow::onCmdTracking),
133   FXMAPFUNC(SEL_UPDATE,   SplitterWindow::ID_TRACKING,  SplitterWindow::onUpdTracking),
134   };
135 
136 
137 // Object implementation
FXIMPLEMENT(SplitterWindow,FXMainWindow,SplitterWindowMap,ARRAYNUMBER (SplitterWindowMap))138 FXIMPLEMENT(SplitterWindow,FXMainWindow,SplitterWindowMap,ARRAYNUMBER(SplitterWindowMap))
139 
140 
141 // Make some windows
142 SplitterWindow::SplitterWindow(FXApp* a):FXMainWindow(a,"Splitter Test",NULL,NULL,DECOR_ALL,0,0,800,600){
143   int i;
144 
145   // Folder open icon
146   folder_open=new FXGIFIcon(getApp(),minifolderopen);
147 
148   // Folder closed icon
149   folder_closed=new FXGIFIcon(getApp(),minifolderclosed);
150 
151   // Document icon
152   doc=new FXGIFIcon(getApp(),minidoc1);
153 
154   bigdoc=new FXGIFIcon(getApp(),bigfolder);
155 
156   // Menu bar
157   menubar=new FXMenuBar(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X);
158 
159   // Status bar
160   status=new FXStatusBar(this,LAYOUT_SIDE_BOTTOM|LAYOUT_FILL_X|STATUSBAR_WITH_DRAGCORNER);
161 
162   // File menu
163   filemenu=new FXMenuPane(this);
164   new FXMenuCommand(filemenu,"Quit\tCtl-Q",NULL,getApp(),FXApp::ID_QUIT);
165   new FXMenuTitle(menubar,"&File",NULL,filemenu);
166 
167   // Main window interior
168   splitter=new FXSplitter(this,LAYOUT_SIDE_TOP|LAYOUT_FILL_X|LAYOUT_FILL_Y|SPLITTER_REVERSED|SPLITTER_TRACKING);
169   group1=new FXVerticalFrame(splitter,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y, 0,0,0,0, 0,0,0,0);
170   group2=new FXVerticalFrame(splitter,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FIX_WIDTH);
171   group3=new FXVerticalFrame(splitter,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y);
172 
173   // Mode menu
174   modemenu=new FXMenuPane(this);
175   new FXMenuRadio(modemenu,"Reverse\t\tReverse split order",this,ID_REVERSE);
176   new FXMenuRadio(modemenu,"Normal\t\tNormal split order",this,ID_NORMAL);
177   new FXMenuRadio(modemenu,"Horizontal\t\tHorizontal split",this,ID_HORIZONTAL);
178   new FXMenuRadio(modemenu,"Vertical\t\tVertical split",this,ID_VERTICAL);
179   new FXMenuCheck(modemenu,"Tracking\t\tToggle continuous tracking mode",this,ID_TRACKING);
180   new FXMenuCheck(modemenu,"Toggle pane 1",group1,FXWindow::ID_TOGGLESHOWN);
181   new FXMenuCheck(modemenu,"Toggle pane 2",group2,FXWindow::ID_TOGGLESHOWN);
182   new FXMenuCheck(modemenu,"Toggle pane 3",group3,FXWindow::ID_TOGGLESHOWN);
183 
184   new FXMenuTitle(menubar,"&Mode",NULL,modemenu);
185 
186   FXTreeList *tree=new FXTreeList(group1,NULL,0,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_TOP|LAYOUT_RIGHT|TREELIST_SHOWS_BOXES|TREELIST_SHOWS_LINES|TREELIST_EXTENDEDSELECT);
187   FXTreeItem *branch,*twig,*leaf,*topmost;
188 
189   topmost=tree->appendItem(0,"Top",folder_open,folder_closed);
190   tree->expandTree(topmost);
191     tree->appendItem(topmost,"First",doc,doc);
192     tree->appendItem(topmost,"Second",doc,doc);
193     tree->appendItem(topmost,"Third",bigdoc,bigdoc);
194     branch=tree->appendItem(topmost,"Fourth",folder_open,folder_closed);
195     tree->expandTree(branch);
196       tree->appendItem(branch,"Fourth-First",doc,doc);
197       tree->appendItem(branch,"Fourth-Second",doc,doc);
198       twig=tree->appendItem(branch,"Fourth-Third",folder_open,folder_closed);
199         tree->appendItem(twig,"Fourth-Third-First",doc,doc);
200         tree->appendItem(twig,"Fourth-Third-Second",doc,doc);
201         tree->appendItem(twig,"Fourth-Third-Third",doc,doc);
202         leaf=tree->appendItem(twig,"Fourth-Third-Fourth",folder_open,folder_closed);
203         leaf->setEnabled(FALSE);
204           tree->appendItem(leaf,"Fourth-Third-Fourth-First",doc,doc);
205           tree->appendItem(leaf,"Fourth-Third-Fourth-Second",doc,doc);
206           tree->appendItem(leaf,"Fourth-Third-Fourth-Third",doc,doc);
207       twig=tree->appendItem(branch,"Fourth-Fourth",folder_open,folder_closed);
208         tree->appendItem(twig,"Fourth-Fourth-First",doc,doc);
209         tree->appendItem(twig,"Fourth-Fourth-Second",doc,doc);
210         tree->appendItem(twig,"Fourth-Fourth-Third",doc,doc);
211         for(i=0; i<10; i++){
212           tree->prependItem(twig,FXStringVal(i),doc,doc);
213           }
214       twig=tree->appendItem(branch,"Fourth-Fifth",folder_open,folder_closed);
215       tree->expandTree(twig);
216         tree->appendItem(twig,"Fourth-Fifth-First",doc,doc);
217         tree->appendItem(twig,"Fourth-Fifth-Second",doc,doc);
218         tree->appendItem(twig,"Fourth-Fifth-Third",doc,doc);
219         for(i=0; i<10; i++){
220           tree->appendItem(twig,FXStringVal(i),doc,doc);
221           }
222     tree->appendItem(topmost,"Fifth",doc,doc);
223     tree->appendItem(topmost,"Sixth",doc,doc);
224     branch=tree->appendItem(topmost,"Seventh",folder_open,folder_closed);
225       tree->appendItem(branch,"Seventh-First",doc,doc);
226       tree->appendItem(branch,"Seventh-Second",doc,doc);
227       tree->appendItem(branch,"Seventh-Third",doc,doc);
228     tree->appendItem(topmost,"Eighth",doc,doc);
229 
230 
231   new FXLabel(group2,"Matrix",NULL,LAYOUT_CENTER_X);
232   new FXHorizontalSeparator(group2,SEPARATOR_GROOVE|LAYOUT_FILL_X);
233   FXMatrix* matrix=new FXMatrix(group2,2,MATRIX_BY_COLUMNS|LAYOUT_FILL_X);
234 
235   new FXLabel(matrix,"Alpha:",NULL,JUSTIFY_RIGHT|LAYOUT_FILL_X|LAYOUT_CENTER_Y);
236   new FXTextField(matrix,2,NULL,0,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_CENTER_Y|LAYOUT_FILL_COLUMN);
237   new FXLabel(matrix,"Beta:",NULL,JUSTIFY_RIGHT|LAYOUT_FILL_X|LAYOUT_CENTER_Y);
238   new FXTextField(matrix,2,NULL,0,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_CENTER_Y|LAYOUT_FILL_COLUMN);
239   new FXLabel(matrix,"Gamma:",NULL,JUSTIFY_RIGHT|LAYOUT_FILL_X|LAYOUT_CENTER_Y);
240   new FXTextField(matrix,2,NULL,0,FRAME_SUNKEN|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_CENTER_Y|LAYOUT_FILL_COLUMN);
241 
242   new FXCheckButton(group2,"Continuous Tracking\tSplitter continuously tracks split changes",this,ID_TRACKING);
243 
244   new FXLabel(group3,"Quite a Stretch",NULL,LAYOUT_CENTER_X);
245   new FXHorizontalSeparator(group3,SEPARATOR_GROOVE|LAYOUT_FILL_X);
246   FXMatrix* mat=new FXMatrix(group3,3,LAYOUT_FILL_X|LAYOUT_FILL_Y);
247 
248   new FXButton(mat,"One\nStretch the row\nStretch in Y\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_ROW);
249   new FXButton(mat,"Two\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X);
250   new FXButton(mat,"Three\nStretch the row\nStretch in Y\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_ROW);
251 
252   new FXButton(mat,"Four\nStretch the column\nStretch the row\nStretch in Y\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_ROW|LAYOUT_FILL_COLUMN);
253   new FXButton(mat,"Five\nStretch the column\nStretch in Y\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN);
254   new FXButton(mat,"Six\nStretch the column\nStretch the row\nStretch in Y\nStretch in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_X|LAYOUT_FILL_Y|LAYOUT_FILL_COLUMN|LAYOUT_FILL_ROW);
255 
256   new FXButton(mat,"Seven\nStretch the column\nStretch the row\nCenter in Y\nCenter in X\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_CENTER_Y|LAYOUT_CENTER_X|LAYOUT_FILL_ROW|LAYOUT_FILL_COLUMN);
257   new FXButton(mat,"Eight\nStretch the column\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_FILL_COLUMN);
258   new FXButton(mat,"Nine\nStretch the column\nStretch the row\nStretch in Y\tThe possibilities are endless..",NULL,NULL,0,FRAME_RAISED|FRAME_THICK|LAYOUT_RIGHT|LAYOUT_FILL_Y|LAYOUT_FILL_ROW|LAYOUT_FILL_COLUMN);
259 
260   // Make a tool tip
261   new FXToolTip(getApp(),0);
262   }
263 
264 
265 // Clean up
~SplitterWindow()266 SplitterWindow::~SplitterWindow(){
267   delete filemenu;
268   delete modemenu;
269   delete folder_open;
270   delete folder_closed;
271   delete doc;
272   delete bigdoc;
273   }
274 
275 
onCmdReverse(FXObject *,FXSelector,void *)276 long SplitterWindow::onCmdReverse(FXObject*,FXSelector,void*){
277   splitter->setSplitterStyle(splitter->getSplitterStyle()|SPLITTER_REVERSED);
278   return 1;
279   }
280 
onUpdReverse(FXObject * sender,FXSelector,void *)281 long SplitterWindow::onUpdReverse(FXObject* sender,FXSelector,void*){
282   sender->handle(this,(splitter->getSplitterStyle()&SPLITTER_REVERSED)?FXSEL(SEL_COMMAND,ID_CHECK):FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
283   return 1;
284   }
285 
onCmdNormal(FXObject *,FXSelector,void *)286 long SplitterWindow::onCmdNormal(FXObject*,FXSelector,void*){
287   splitter->setSplitterStyle(splitter->getSplitterStyle()&~SPLITTER_REVERSED);
288   return 1;
289   }
290 
onUpdNormal(FXObject * sender,FXSelector,void *)291 long SplitterWindow::onUpdNormal(FXObject* sender,FXSelector,void*){
292   sender->handle(this,(splitter->getSplitterStyle()&SPLITTER_REVERSED)?FXSEL(SEL_COMMAND,ID_UNCHECK):FXSEL(SEL_COMMAND,ID_CHECK),NULL);
293   return 1;
294   }
295 
onCmdHorizontal(FXObject *,FXSelector,void *)296 long SplitterWindow::onCmdHorizontal(FXObject*,FXSelector,void*){
297   splitter->setSplitterStyle(splitter->getSplitterStyle()&~SPLITTER_VERTICAL);
298   return 1;
299   }
300 
onUpdHorizontal(FXObject * sender,FXSelector,void *)301 long SplitterWindow::onUpdHorizontal(FXObject* sender,FXSelector,void*){
302   sender->handle(this,(splitter->getSplitterStyle()&SPLITTER_VERTICAL)?FXSEL(SEL_COMMAND,ID_UNCHECK):FXSEL(SEL_COMMAND,ID_CHECK),NULL);
303   return 1;
304   }
onCmdVectical(FXObject *,FXSelector,void *)305 long SplitterWindow::onCmdVectical(FXObject*,FXSelector,void*){
306   splitter->setSplitterStyle(splitter->getSplitterStyle()|SPLITTER_VERTICAL);
307   return 1;
308   }
309 
onUpdVectical(FXObject * sender,FXSelector,void *)310 long SplitterWindow::onUpdVectical(FXObject* sender,FXSelector,void*){
311   sender->handle(this,(splitter->getSplitterStyle()&SPLITTER_VERTICAL)?FXSEL(SEL_COMMAND,ID_CHECK):FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
312   return 1;
313   }
314 
onCmdTracking(FXObject *,FXSelector,void *)315 long SplitterWindow::onCmdTracking(FXObject*,FXSelector,void*){
316   splitter->setSplitterStyle(splitter->getSplitterStyle()^SPLITTER_TRACKING);
317   return 1;
318   }
319 
onUpdTracking(FXObject * sender,FXSelector,void *)320 long SplitterWindow::onUpdTracking(FXObject* sender,FXSelector,void*){
321   if(splitter->getSplitterStyle()&SPLITTER_TRACKING){
322     sender->handle(this,FXSEL(SEL_COMMAND,ID_CHECK),NULL);
323     }
324   else{
325     sender->handle(this,FXSEL(SEL_COMMAND,ID_UNCHECK),NULL);
326     }
327   return 1;
328   }
329 
330 
331 
332 // Start
create()333 void SplitterWindow::create(){
334   FXMainWindow::create();
335   show(PLACEMENT_SCREEN);
336   }
337 
338 
339 /*******************************************************************************/
340 
341 
342 // Start the whole thing
main(int argc,char * argv[])343 int main(int argc,char *argv[]){
344   FXApp  application("Splitter","FoxTest");
345   application.init(argc,argv);
346   SplitterWindow* mainwindow=new SplitterWindow(&application);
347   application.create();
348   mainwindow->show();
349   return application.run();
350   }
351 
352 
353