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

FXMenuCascade.h
1 /********************************************************************************
2 * *
3 * M e n u C a s c a d e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2018 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 FXMENUCASCADE_H
22 #define FXMENUCASCADE_H
23 
24 #ifndef FXMENUCAPTION_H
25 #include "FXMenuCaption.h"
26 #endif
27 
28 namespace FX {
29 
30 
31 class FXPopup;
32 
33 
38 class FXAPI FXMenuCascade : public FXMenuCaption {
39  FXDECLARE(FXMenuCascade)
40 protected:
41  FXPopup *pane;
42 protected:
43  FXMenuCascade();
44  void drawTriangle(FXDCWindow& dc,FXint l,FXint t,FXint r,FXint b);
45 private:
47  FXMenuCascade &operator=(const FXMenuCascade&);
48 public:
49  long onPaint(FXObject*,FXSelector,void*);
50  long onEnter(FXObject*,FXSelector,void*);
51  long onLeave(FXObject*,FXSelector,void*);
52  long onButtonPress(FXObject*,FXSelector,void*);
53  long onButtonRelease(FXObject*,FXSelector,void*);
54  long onKeyPress(FXObject*,FXSelector,void*);
55  long onKeyRelease(FXObject*,FXSelector,void*);
56  long onHotKeyPress(FXObject*,FXSelector,void*);
57  long onHotKeyRelease(FXObject*,FXSelector,void*);
58  long onCmdPost(FXObject*,FXSelector,void*);
59  long onCmdUnpost(FXObject*,FXSelector,void*);
60 public:
61  enum {
62  ID_MENUTIMER=FXMenuCaption::ID_LAST,
63  ID_LAST
64  };
65 public:
66 
68  FXMenuCascade(FXComposite* p,const FXString& text,FXIcon* ic=NULL,FXPopup* pup=NULL,FXuint opts=0);
69 
71  virtual void create();
72 
74  virtual void detach();
75 
77  virtual void destroy();
78 
80  virtual FXbool canFocus() const;
81 
83  virtual void setFocus();
84 
86  virtual void killFocus();
87 
89  void setMenu(FXPopup *pup){ pane = pup; }
90 
92  FXPopup* getMenu() const { return pane; }
93 
95  virtual FXbool contains(FXint parentx,FXint parenty) const;
96 
98  virtual void save(FXStream& store) const;
99 
101  virtual void load(FXStream& store);
102 
104  virtual ~FXMenuCascade();
105  };
106 
107 }
108 
109 #endif
Popup window is used as a container for transitional controls such as menu panes and other ephemeral ...
Definition: FXPopup.h:51
Base composite.
Definition: FXComposite.h:32
A stream is a way to serialize data and objects into a byte stream.
Definition: FXStream.h:78
The menu caption is a widget which can be used as a caption above a number of menu commands in a menu...
Definition: FXMenuCaption.h:52
Definition: FX4Splitter.h:28
An Icon is an image with two additional server-side resources: a shape bitmap, which is used to mask ...
Definition: FXIcon.h:42
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:104
Window Device Context.
Definition: FXDCWindow.h:48
FXPopup * getMenu() const
Return popup menu.
Definition: FXMenuCascade.h:92
void setMenu(FXPopup *pup)
Set popup menu to pop up.
Definition: FXMenuCascade.h:89
The cascade menu widget is used to bring up a sub menu from a pull down menu.
Definition: FXMenuCascade.h:38
FXString provides essential string manipulation capabilities in FOX.
Definition: FXString.h:42

Copyright © 1997-2018 Jeroen van der Zijp