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

FXEventLoop.h
1 /********************************************************************************
2 * *
3 * F O X E v e n t L o o p *
4 * *
5 *********************************************************************************
6 * Copyright (C) 2019,2022 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 FXEVENTLOOP_H
22 #define FXEVENTLOOP_H
23 
24 namespace FX {
25 
26 // Forward declarations
27 class FXWindow;
28 class FXEventLoop;
29 
30 
32 class FXAPI FXEventLoop {
33 private:
34  FXEventLoop **invocation; // Pointer to variable holding pointer to current invocation
35  FXEventLoop *upper; // Invocation above this one
36  FXWindow *modalWindow; // Modal window (if any)
37  FXuint modalType; // Modal type
38  FXint code; // Return code
39  FXbool exit; // Exit flag
40 public:
41  enum{
42  ModalForNone = 0,
43  ModalForWindow = 1,
44  ModalForPopup = 2
45  };
46 private:
47  FXEventLoop(const FXEventLoop&);
48  FXEventLoop& operator=(const FXEventLoop&);
49 public:
50 
52  FXEventLoop(FXEventLoop** inv,FXWindow* win=nullptr,FXuint mode=0);
53 
55  FXbool isModal() const;
56 
58  FXbool isModal(FXWindow *win) const;
59 
61  FXbool stopModal(FXint value);
62 
64  FXbool stopModal(FXWindow* win,FXint value);
65 
67  FXbool stop(FXint value);
68 
70  FXWindow* window() const { return modalWindow; }
71 
73  FXuint modality() const { return modalType; }
74 
76  FXint result() const { return code; }
77 
79  FXbool done() const { return exit; }
80 
82  ~FXEventLoop();
83  };
84 
85 }
86 
87 #endif
Window is the base class for all widgets in FOX.
Definition: FXWindow.h:130
FXuint modality() const
Return mode of this model event loop.
Definition: FXEventLoop.h:73
Definition: FX4Splitter.h:28
FXWindow * window() const
Return window of current modal event loop.
Definition: FXEventLoop.h:70
Recursive event loop.
Definition: FXEventLoop.h:32
FXbool done() const
Return done flag.
Definition: FXEventLoop.h:79
FXint result() const
Return result-code of this loop.
Definition: FXEventLoop.h:76

Copyright © 1997-2022 Jeroen van der Zijp