Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members

FXApp.h
1 /********************************************************************************
2 * *
3 * A p p l i c a t i o n O b j e c t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2024 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or modify *
9 * it under the terms of the GNU Lesser General Public License as published by *
10 * the Free Software Foundation; either version 3 of the License, or *
11 * (at your option) any later version. *
12 * *
13 * This library is distributed in the hope that it will be useful, *
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of *
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
16 * GNU Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public License *
19 * along with this program. If not, see <http://www.gnu.org/licenses/> *
20 ********************************************************************************/
21 #ifndef FXAPP_H
22 #define FXAPP_H
23 
24 #ifndef FXOBJECT_H
25 #include "FXObject.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 // Forward declarations
32 class FXApp;
33 class FXWindow;
34 class FXIcon;
35 class FXBitmap;
36 class FXCursor;
37 class FXRootWindow;
38 class FXMainWindow;
39 class FXPopup;
40 class FXFont;
41 class FXDC;
42 class FXDCWindow;
43 class FXVisual;
44 class FXGLVisual;
45 class FXGLContext;
46 class FXTranslator;
47 class FXComposeContext;
48 
49 // Opaque FOX objects
50 struct FXTimer;
51 struct FXChore;
52 struct FXSignal;
53 struct FXRepaint;
54 struct FXInput;
55 struct FXHandles;
56 struct FXInvocation;
57 
58 
59 
61 enum FXInputMode {
62  INPUT_NONE = 0,
63  INPUT_READ = 1,
64  INPUT_WRITE = 2,
65  INPUT_EXCEPT = 4
66  };
67 
68 
70 enum FXModality {
71  MODAL_FOR_NONE,
72  MODAL_FOR_WINDOW,
73  MODAL_FOR_POPUP
74  };
75 
76 
78 enum FXDefaultCursor {
79  DEF_ARROW_CURSOR,
80  DEF_RARROW_CURSOR,
81  DEF_TEXT_CURSOR,
82  DEF_HSPLIT_CURSOR,
83  DEF_VSPLIT_CURSOR,
84  DEF_XSPLIT_CURSOR,
85  DEF_SWATCH_CURSOR,
86  DEF_MOVE_CURSOR,
87  DEF_DRAGH_CURSOR,
88  DEF_DRAGV_CURSOR,
89  DEF_DRAGTL_CURSOR,
90  DEF_DRAGBR_CURSOR=DEF_DRAGTL_CURSOR,
91  DEF_DRAGTR_CURSOR,
92  DEF_DRAGBL_CURSOR=DEF_DRAGTR_CURSOR,
93  DEF_DNDSTOP_CURSOR,
94  DEF_DNDASK_CURSOR,
95  DEF_DNDCOPY_CURSOR,
96  DEF_DNDMOVE_CURSOR,
97  DEF_DNDLINK_CURSOR,
98  DEF_CROSSHAIR_CURSOR,
99  DEF_CORNERNE_CURSOR,
100  DEF_CORNERNW_CURSOR,
101  DEF_CORNERSE_CURSOR,
102  DEF_CORNERSW_CURSOR,
103  DEF_HELP_CURSOR,
104  DEF_HAND_CURSOR,
105  DEF_ROTATE_CURSOR,
106  DEF_BLANK_CURSOR,
107  DEF_WAIT_CURSOR
108  };
109 
110 
134 class FXAPI FXApp : public FXObject {
135  FXDECLARE(FXApp)
136 
137  // We've got many friends
138  friend class FXId;
139  friend class FXBitmap;
140  friend class FXImage;
141  friend class FXIcon;
142  friend class FXCursor;
143  friend class FXDrawable;
144  friend class FXWindow;
145  friend class FXShell;
146  friend class FXRootWindow;
147  friend class FXTopWindow;
148  friend class FXMainWindow;
149  friend class FXPopup;
150  friend class FXFont;
151  friend class FXVisual;
152  friend class FXGLVisual;
153  friend class FXGLContext;
154  friend class FXDC;
155  friend class FXDCWindow;
156  friend class FXDragCorner;
157  friend class FXDockHandler;
158  friend class FXComposeContext;
159 
160 private:
161 
162  // Platform independent private data
163  void *display; // Display we're talking to
164  FXHash hash; // Window handle hash table
165  FXRegistry registry; // Application setting registry
166  FXWindow *activeWindow; // Active toplevel window
167  FXWindow *cursorWindow; // Window under the cursor
168  FXWindow *mouseGrabWindow; // Window which grabbed the mouse
169  FXWindow *keyboardGrabWindow; // Window which grabbed the keyboard
170  FXWindow *keyWindow; // Window in which keyboard key was pressed
171  FXWindow *selectionWindow; // Selection window
172  FXWindow *clipboardWindow; // Clipboard window
173  FXWindow *dropWindow; // Drop target window
174  FXWindow *dragWindow; // Drag source window
175  FXWindow *refresher; // GUI refresher pointer
176  FXWindow *refresherstop; // GUI refresher end pointer
177  FXPopup *popupWindow; // Current popup window
178  FXRootWindow *root; // Root window
179  FXVisual *monoVisual; // Monochrome visual
180  FXVisual *defaultVisual; // Default [color] visual
181  FXTimer *timers; // List of timers, sorted by time
182  FXChore *chores; // List of chores
183  FXRepaint *repaints; // Unhandled repaint rectangles
184  FXTimer *timerrecs; // List of recycled timer records
185  FXChore *chorerecs; // List of recycled chore records
186  FXRepaint *repaintrecs; // List of recycled repaint records
187  FXInvocation *invocation; // Modal loop invocation
188  FXSignal *signals; // Array of signal records
189  FXint signalreceived; // Latest signal received
190  FXFont *normalFont; // Normal font
191  FXFont *stockFont; // Stock font
192  FXMutex appMutex; // Application wide mutex
193  FXEvent event; // Event
194  FXuint stickyMods; // Sticky modifier state
195  FXInput *inputs; // Input file descriptors being watched
196  FXint ninputs; // Number of inputs
197  FXHandles *handles; // Input handles
198  FXint maxhandle; // Maximum handle number
199  FXuchar *ddeData; // DDE array
200  FXuint ddeSize; // DDE array size
201  FXuint maxcolors; // Maximum number of colors to allocate
202  FXTime typingSpeed; // Typing speed
203  FXTime clickSpeed; // Double click speed
204  FXTime scrollSpeed; // Scroll speed
205  FXTime scrollDelay; // Scroll delay
206  FXTime blinkSpeed; // Cursor blink speed
207  FXTime animSpeed; // Animation speed
208  FXTime menuPause; // Menu popup delay
209  FXTime toolTipPause; // Tooltip popup delay
210  FXTime toolTipTime; // Tooltip display time
211  FXTime autoHideDelay; // Cursor autohide delay time
212  FXint dragDelta; // Minimum distance considered a move
213  FXint wheelLines; // Scroll by this many lines
214  FXint scrollBarSize; // Scrollbar size
215  FXColor borderColor; // Border color
216  FXColor baseColor; // Background color of GUI controls
217  FXColor hiliteColor; // Highlight color of GUI controls
218  FXColor shadowColor; // Shadow color of GUI controls
219  FXColor backColor; // Background color
220  FXColor foreColor; // Foreground color
221  FXColor selforeColor; // Select foreground color
222  FXColor selbackColor; // Select background color
223  FXColor tipforeColor; // Tooltip foreground color
224  FXColor tipbackColor; // Tooltip background color
225  FXColor selMenuTextColor; // Select foreground color in menus
226  FXColor selMenuBackColor; // Select background color in menus
227  FXCursor *waitCursor; // Current wait cursor
228  FXuint waitCount; // Number of times wait cursor was called
229  FXuint windowCount; // Number of windows
230  FXCursor *cursor[DEF_WAIT_CURSOR+1];
231  FXTranslator *translator; // Message translator
232  FXint appArgc; // Argument count
233  const FXchar *const *appArgv; // Argument vector
234  const FXchar *inputmethod; // Input method name
235  const FXchar *inputstyle; // Input method style
236  FXbool initialized; // Has been initialized
237 
238 private:
239  static FXApp *app; // Application pointer
240 
241  // Platform dependent private stuff
242 #ifdef WIN32
243 
244  FXushort ddeTargets; // DDE targets atom
245  FXushort ddeAtom; // DDE Exchange Atom
246  FXDragType ddeDelete; // DDE Delete Target Atom
247  FXDragType *ddeTypeList; // DDE drop type list
248  FXuint ddeNumTypes; // DDE number of drop types
249  FXDragAction ddeAction; // DDE action
250  FXDragAction ansAction; // Reply action
251  FXDragType *xselTypeList; // Selection type list
252  FXuint xselNumTypes; // Selection number of types on list
253  void* xdndTypes; // Handle to file mapping object for types list
254  FXushort xdndAware; // XDND awareness atom
255  FXID xdndSource; // XDND drag source window
256  FXID xdndTarget; // XDND drop target window
257  FXbool xdndStatusPending; // XDND waiting for status feedback
258  FXbool xdndFinishPending; // XDND waiting for drop-confirmation
259  FXbool xdndStatusReceived; // XDND received at least one status
260  FXbool xdndFinishSent; // XDND finish sent
261  FXRectangle xdndRect; // XDND rectangle bounding target
262  FXID stipples[17]; // Standard stipple bitmaps
263 
264 #else
265 
266 private:
267  FXID wmDeleteWindow; // Catch delete window
268  FXID wmSaveYourself; // Catch shutdown
269  FXID wmQuitApp; // Catch quit application
270  FXID wmProtocols; // Window manager protocols
271  FXID wmMotifHints; // Motif hints
272  FXID wmTakeFocus; // Focus explicitly set by app
273  FXID wmClientMachine; // Client machine
274  FXID wmState; // Window state
275  FXID wmNetState; // Extended Window Manager window state
276  FXID wmNetIconName; // Extended Window Manager icon name
277  FXID wmNetWindowName; // Extended Window Manager window name
278  FXID wmNetSupported; // Extended Window Manager states list
279  FXID wmNetHidden; // Extended Window Manager hidden
280  FXID wmNetShaded; // Extended Window Manager shaded
281  FXID wmNetHMaximized; // Extended Window Manager horizontally maximized
282  FXID wmNetVMaximized; // Extended Window Manager vertically maximized
283  FXID wmNetFullScreen; // Extended Window Manager full screen
284  FXID wmNetBelowOthers; // Extended Window Manager below others
285  FXID wmNetAboveOthers; // Extended Window Manager above others
286  FXID wmNetNeedAttention; // Extended Window Manager need attention
287  FXID wmNetActiveWindow; // Extended Window Manager active window
288  FXID wmNetMoveResize; // Extended Window Manager drag corner
289  FXID wmNetRestack; // Extended Window Manager change stacking order
290  FXID wmNetPing; // Extended Window Manager ping
291  FXID wmNetProcessId; // Extended Window Manager process id
292  FXID wmNetWindowType; // Extended Window Manager window type
293  FXID wmWindowTypes[14]; // Window types
294  FXID wmWindowRole; // Window Role
295  FXID wmClientLeader; // Client leader
296  FXID wmClientId; // Client id
297  FXID embedAtom; // XEMBED support
298  FXID embedInfoAtom; // XEMBED info support
299  FXID timestampAtom; // Server time
300  FXID ddeTargets; // DDE targets atom
301  FXID ddeAtom; // DDE exchange atom
302  FXID ddeDelete; // DDE delete target atom
303  FXID ddeIncr; // DDE incremental data exchange atom
304  FXDragType *ddeTypeList; // DDE drop type list
305  FXuint ddeNumTypes; // DDE number of drop types
306  FXDragAction ddeAction; // DDE action
307  FXDragAction ansAction; // Reply action
308  FXID xcbSelection; // Clipboard selection
309  FXDragType *xcbTypeList; // Clipboard type list
310  FXuint xcbNumTypes; // Clipboard number of types on list
311  FXDragType *xselTypeList; // Selection type list
312  FXuint xselNumTypes; // Selection number of types on list
313  FXDragType *xdndTypeList; // XDND type list
314  FXuint xdndNumTypes; // XDND number of types
315  FXID xdndProxy; // XDND proxy atom
316  FXID xdndAware; // XDND awareness atom
317  FXID xdndEnter; // XDND enter window message
318  FXID xdndLeave; // XDND leave window message
319  FXID xdndPosition; // XDND position update message
320  FXID xdndStatus; // XDND status feedback message
321  FXID xdndDrop; // XDND drop message
322  FXID xdndFinished; // XDND finished message
323  FXID xdndSelection; // XDND selection atom
324  FXID xdndTypes; // XDND type list atom
325  FXID xdndActions; // XDND action list atom
326  FXID xdndActionList[6]; // XDND actions
327  FXID xdndSource; // XDND drag source window
328  FXID xdndTarget; // XDND drop target window
329  FXID xdndProxyTarget; // XDND window to set messages to
330  FXbool xdndStatusPending; // XDND waiting for status feedback
331  FXbool xdndStatusReceived; // XDND received at least one status
332  FXbool xdndWantUpdates; // XDND target wants new positions while in rect
333  FXbool xdndFinishSent; // XDND finish sent
334  FXRectangle xdndRect; // XDND rectangle bounding target
335  FXint xrrScreenChange; // Xrandr ScreenChange event
336  FXint xfxFixesSelection; // Xfixes selection event
337  FXint xInputOpcode; // XInput2 opcode
338  FXint xsbDevice; // Space ball input device id
339  FXID stipples[23]; // Standard stipple patterns
340  void *xim; // Input method
341  FXbool shmi; // Use XSHM Image possible
342  FXbool shmp; // Use XSHM Pixmap possible
343  FXbool xrender; // XRender available
344  FXbool synchronize; // Synchronized
345 
346 #endif
347 
348 private:
349 
350  // Internal helper functions
351  FXApp(const FXApp&);
352  FXApp &operator=(const FXApp&);
353  static void CDECL signalhandler(int sig);
354  static void CDECL immediatesignalhandler(int sig);
355  void leaveWindow(FXWindow *window,FXWindow *ancestor);
356  void enterWindow(FXWindow *window,FXWindow *ancestor);
357  void selectionSetData(const FXWindow* window,FXDragType type,FXuchar* data,FXuint size);
358  void selectionGetData(const FXWindow* window,FXDragType type,FXuchar*& data,FXuint& size);
359  void selectionGetTypes(const FXWindow* window,FXDragType*& types,FXuint& numtypes);
360  void clipboardSetData(const FXWindow* window,FXDragType type,FXuchar* data,FXuint size);
361  void clipboardGetData(const FXWindow* window,FXDragType type,FXuchar*& data,FXuint& size);
362  void clipboardGetTypes(const FXWindow* window,FXDragType*& types,FXuint& numtypes);
363  void dragdropSetData(const FXWindow* window,FXDragType type,FXuchar* data,FXuint size);
364  void dragdropGetData(const FXWindow* window,FXDragType type,FXuchar*& data,FXuint& size);
365  void dragdropGetTypes(const FXWindow* window,FXDragType*& types,FXuint& numtypes);
366  void openInputDevices();
367  void closeInputDevices();
368 #ifdef WIN32
369  static FXival CALLBACK wndproc(FXID hwnd,FXuint iMsg,FXuval wParam,FXival lParam);
370 protected:
371  virtual FXival dispatchEvent(FXID hwnd,FXuint iMsg,FXuval wParam,FXival lParam);
372 #else
373  void addRepaint(FXID win,FXint x,FXint y,FXint w,FXint h,FXbool synth=false);
374  void removeRepaints(FXID win,FXint x,FXint y,FXint w,FXint h);
375  void scrollRepaints(FXID win,FXint dx,FXint dy);
376  static void imcreatecallback(void*,FXApp*,void*);
377  static void imdestroycallback(void*,FXApp*,void*);
378 #endif
379 
380 protected:
381 
383  virtual FXbool getNextEvent(FXRawEvent& ev,FXTime blocking=forever);
384 
386  virtual FXbool dispatchEvent(FXRawEvent& ev);
387 
388 public:
389  long onCmdQuit(FXObject*,FXSelector,void*);
390  long onCmdDump(FXObject*,FXSelector,void*);
391  long onCmdHover(FXObject*,FXSelector,void*);
392 
393 public:
394 
396  enum {
397  ID_QUIT=1,
400  ID_LAST
401  };
402 
403 public:
404 
406  static const FXuchar copyright[];
407 
408 public:
409 
415  FXApp(const FXString& name="Application",const FXString& vendor=FXString::null);
416 
418  void setAppName(const FXString& name);
419 
421  const FXString& getAppName() const;
422 
424  void setVendorName(const FXString& name);
425 
427  const FXString& getVendorName() const;
428 
430  FXbool hasInputMethod() const;
431 
433  void setDefaultVisual(FXVisual* vis);
434 
436  FXVisual* getDefaultVisual() const { return defaultVisual; }
437 
439  FXVisual* getMonoVisual() const { return monoVisual; }
440 
442  void setRootWindow(FXRootWindow* rt);
443 
445  FXRootWindow* getRootWindow() const { return root; }
446 
448  FXWindow *getFocusWindow() const;
449 
451  FXWindow *getCursorWindow() const { return cursorWindow; }
452 
454  FXWindow *getActiveWindow() const { return activeWindow; }
455 
457  FXPopup* getPopupWindow() const { return popupWindow; }
458 
460  FXWindow* getSelectionWindow() const { return selectionWindow; }
461 
463  FXWindow* getClipboardWindow() const { return clipboardWindow; }
464 
466  FXWindow* getDragWindow() const { return dragWindow; }
467 
469  FXWindow* findWindowWithId(FXID xid) const;
470 
472  FXWindow* findWindowAt(FXint rx,FXint ry,FXID window=0) const;
473 
475  void setNormalFont(FXFont* font);
476 
478  FXFont* getNormalFont() const { return normalFont; }
479 
481  void beginWaitCursor();
482 
484  void endWaitCursor();
485 
487  void setWaitCursor(FXCursor *cur);
488 
490  FXCursor* getWaitCursor() const { return waitCursor; }
491 
493  void setDefaultCursor(FXDefaultCursor which,FXCursor* cur);
494 
496  FXCursor* getDefaultCursor(FXDefaultCursor which) const { return cursor[which]; }
497 
499  FXDragType registerDragType(const FXString& name) const;
500 
502  FXString getDragTypeName(FXDragType type) const;
503 
508  void setTranslator(FXTranslator* trans);
509 
513  FXTranslator* getTranslator() const { return translator; }
514 
516  void* getDisplay() const { return display; }
517 
519  virtual FXbool openDisplay(const FXchar* dpy=nullptr);
520 
522  virtual FXbool closeDisplay();
523 
535  FXptr addTimeout(FXObject* tgt,FXSelector sel,FXTime ns=1000000000,FXptr ptr=nullptr);
536 
546  FXptr addDeadline(FXObject* tgt,FXSelector sel,FXTime due=forever,FXptr ptr=nullptr);
547 
553  FXptr removeTimeout(FXObject* tgt,FXSelector sel=0);
554 
559  FXbool hasTimeout(FXObject *tgt,FXSelector sel=0) const;
560 
568  FXTime remainingTimeout(FXObject *tgt,FXSelector sel=0) const;
569 
578  FXptr addChore(FXObject* tgt,FXSelector sel,FXptr ptr=nullptr);
579 
585  FXptr removeChore(FXObject* tgt,FXSelector sel=0);
586 
591  FXbool hasChore(FXObject *tgt,FXSelector sel=0) const;
592 
600  void addSignal(FXint sig,FXObject* tgt,FXSelector sel,FXbool immediate=false,FXuint flags=0);
601 
603  void removeSignal(FXint sig);
604 
615  FXbool addInput(FXObject *tgt,FXSelector sel,FXInputHandle fd,FXuint mode=INPUT_READ,FXptr ptr=nullptr);
616 
623  FXbool removeInput(FXInputHandle fd,FXuint mode=INPUT_READ);
624 
626  FXbool getKeyState(FXuint keysym) const;
627 
629  FXbool peekEvent();
630 
632  FXbool runOneEvent(FXTime blocking=forever);
633 
638  FXint run();
639 
644  FXint runUntil(FXuint& condition);
645 
651  FXint runWhileEvents(FXTime blocking=0);
652 
660  FXint runModalWhileEvents(FXWindow* window=nullptr,FXTime blocking=0);
661 
666  FXint runModal();
667 
673  FXint runModalFor(FXWindow* window);
674 
680  FXint runModalWhileShown(FXWindow* window);
681 
686  FXint runPopup(FXWindow* window);
687 
689  FXbool isModal(FXWindow* window) const;
690 
692  FXWindow* getModalWindow() const;
693 
695  FXModality getModality() const;
696 
702  void stop(FXint value=0);
703 
708  void stopModal(FXWindow* window,FXint value=0);
709 
713  void stopModal(FXint value=0);
714 
719  void refresh();
720 
724  void forceRefresh();
725 
730  void flush(FXbool sync=false);
731 
736  void repaint();
737 
739  FXint getArgc() const { return appArgc; }
740 
742  const FXchar *const *getArgv() const { return appArgv; }
743 
745  FXbool isInitialized() const { return initialized; }
746 
752  virtual void init(int& argc,char** argv,FXbool connect=true);
753 
758  virtual void exit(FXint code=0);
759 
766  FXRegistry& reg(){ return registry; }
767 
780  FXMutex& mutex(){ return appMutex; }
781 
783  void beep();
784 
786  FXTime getTypingSpeed() const { return typingSpeed; }
787  FXTime getClickSpeed() const { return clickSpeed; }
788  FXTime getScrollSpeed() const { return scrollSpeed; }
789  FXTime getScrollDelay() const { return scrollDelay; }
790  FXTime getBlinkSpeed() const { return blinkSpeed; }
791  FXTime getAnimSpeed() const { return animSpeed; }
792  FXTime getMenuPause() const { return menuPause; }
793  FXTime getToolTipPause() const { return toolTipPause; }
794  FXTime getToolTipTime() const { return toolTipTime; }
795  FXTime getAutoHideDelay() const { return autoHideDelay; }
796 
798  void setTypingSpeed(FXTime speed);
799  void setClickSpeed(FXTime speed);
800  void setScrollSpeed(FXTime speed);
801  void setScrollDelay(FXTime delay);
802  void setBlinkSpeed(FXTime speed);
803  void setAnimSpeed(FXTime speed);
804  void setMenuPause(FXTime pause);
805  void setToolTipPause(FXTime pause);
806  void setToolTipTime(FXTime time);
807  void setAutoHideDelay(FXTime time);
808 
810  void setDragDelta(FXint delta);
811  FXint getDragDelta() const { return dragDelta; }
812 
814  void setWheelLines(FXint lines);
815  FXint getWheelLines() const { return wheelLines; }
816 
818  void setScrollBarSize(FXint size);
819  FXint getScrollBarSize() const { return scrollBarSize; }
820 
822  FXColor getBorderColor() const { return borderColor; }
823  FXColor getBaseColor() const { return baseColor; }
824  FXColor getHiliteColor() const { return hiliteColor; }
825  FXColor getShadowColor() const { return shadowColor; }
826  FXColor getBackColor() const { return backColor; }
827  FXColor getForeColor() const { return foreColor; }
828  FXColor getSelforeColor() const { return selforeColor; }
829  FXColor getSelbackColor() const { return selbackColor; }
830  FXColor getTipforeColor() const { return tipforeColor; }
831  FXColor getTipbackColor() const { return tipbackColor; }
832  FXColor getSelMenuTextColor() const { return selMenuTextColor; }
833  FXColor getSelMenuBackColor() const { return selMenuBackColor; }
834 
836  void setBorderColor(FXColor color);
837  void setBaseColor(FXColor color);
838  void setHiliteColor(FXColor color);
839  void setShadowColor(FXColor color);
840  void setBackColor(FXColor color);
841  void setForeColor(FXColor color);
842  void setSelforeColor(FXColor color);
843  void setSelbackColor(FXColor color);
844  void setTipforeColor(FXColor color);
845  void setTipbackColor(FXColor color);
846  void setSelMenuTextColor(FXColor color);
847  void setSelMenuBackColor(FXColor color);
848 
850  FXuint getWindowCount() const { return windowCount; }
851 
853  virtual void create();
854 
856  virtual void destroy();
857 
859  virtual void detach();
860 
862  virtual void save(FXStream& store) const;
863 
865  virtual void load(FXStream& store);
866 
868  void dumpWidgets() const;
869 
871  static inline FXApp* instance(){ return app; }
872 
874  virtual ~FXApp();
875  };
876 
877 }
878 
879 #endif
const FXchar *const * getArgv() const
Get argument vector.
Definition: FXApp.h:742
FXWindow * getDragWindow() const
Return drag window if a drag operation is in progress.
Definition: FXApp.h:466
A drag corner widget may be placed in the bottom right corner so as to allow the window to be resized...
Definition: FXDragCorner.h:35
A Bitmap is a rectangular array of pixels.
Definition: FXBitmap.h:55
The translator class translates a message to another language.
Definition: FXTranslator.h:38
Rectangle.
Definition: FXRectangle.h:32
FXCursor * getDefaultCursor(FXDefaultCursor which) const
Obtain a default cursor.
Definition: FXApp.h:496
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
Root window.
Definition: FXRootWindow.h:32
Popup window is used as a container for transitional controls such as menu panes and other ephemeral ...
Definition: FXPopup.h:51
FXMutex & mutex()
Return a reference to the application-wide mutex.
Definition: FXApp.h:780
The Application object is the central point of a FOX user-interface.
Definition: FXApp.h:134
FXWindow * getCursorWindow() const
Get the window under the cursor, if any.
Definition: FXApp.h:451
Terminate the application normally.
Definition: FXApp.h:398
FXPopup * getPopupWindow() const
Get current popup window, if any.
Definition: FXApp.h:457
The Main Window is usually the central window of an application.
Definition: FXMainWindow.h:40
The Registry maintains a persistent settings database for an application.
Definition: FXRegistry.h:59
A hash table for mapping pointers to pointers.
Definition: FXHash.h:33
FXWindow * getClipboardWindow() const
Return window currently owning the clipboard.
Definition: FXApp.h:463
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:81
FXTime getTypingSpeed() const
Obtain application-wide timing constants, in nanoseconds.
Definition: FXApp.h:786
FXColor getBorderColor() const
Obtain default colors.
Definition: FXApp.h:822
Abstract Device Context.
Definition: FXDC.h:153
FXuint getWindowCount() const
Get number of existing windows.
Definition: FXApp.h:850
FXFont * getNormalFont() const
Return default font.
Definition: FXApp.h:478
Encapsulates server side resource.
Definition: FXId.h:34
Definition: FX4Splitter.h:28
FXTranslator * getTranslator() const
Return message translator.
Definition: FXApp.h:513
FXCursor * getWaitCursor() const
Return current wait cursor.
Definition: FXApp.h:490
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
FXRegistry & reg()
Return a reference to the registry.
Definition: FXApp.h:766
FOX Event.
Definition: FXEvent.h:165
GL Context.
Definition: FXGLContext.h:32
The Shell widget is used as the base class for top level windows, i.e.
Definition: FXShell.h:35
FXWindow * getActiveWindow() const
Get the active toplevel window, if any.
Definition: FXApp.h:454
Compose Context manages the state of an input method if input method support is enabled.
Definition: FXComposeContext.h:39
Cursor class.
Definition: FXCursor.h:52
Abstract base class for all top-level windows.
Definition: FXTopWindow.h:97
Visual describes pixel format of a drawable.
Definition: FXGLVisual.h:40
FXbool isInitialized() const
Has application been initialized.
Definition: FXApp.h:745
Visual describes pixel format of a drawable.
Definition: FXVisual.h:58
FXVisual * getMonoVisual() const
Get monochrome visual.
Definition: FXApp.h:439
Dump the current widget tree.
Definition: FXApp.h:399
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:134
FXRootWindow * getRootWindow() const
Get root Window.
Definition: FXApp.h:445
Window Device Context.
Definition: FXDCWindow.h:48
An Image is a rectangular array of pixels.
Definition: FXImage.h:67
FXWindow * getSelectionWindow() const
Return window currently owning primary selection.
Definition: FXApp.h:460
void * getDisplay() const
Return pointer.
Definition: FXApp.h:516
static FXApp * instance()
Return application instance.
Definition: FXApp.h:871
FXMutex provides a mutex which can be used to enforce critical sections around updates of data shared...
Definition: FXMutex.h:31
Font class.
Definition: FXFont.h:137
FXint getArgc() const
Get argument count.
Definition: FXApp.h:739
FXVisual * getDefaultVisual() const
Get default visual.
Definition: FXApp.h:436
The dock handler exists as a common base class for tool bar grip and dock title.
Definition: FXDockHandler.h:35
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42
Drawable is an abstract base class for any surface that can be drawn upon, such as a FXWindow...
Definition: FXDrawable.h:38

Copyright © 1997-2022 Jeroen van der Zijp