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

FXMenuTitle.h
1 /********************************************************************************
2 * *
3 * M e n u T i t l e W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1997,2017 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 FXMENUTITLE_H
22 #define FXMENUTITLE_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 FXMenuTitle : public FXMenuCaption {
39  FXDECLARE(FXMenuTitle)
40 protected:
41  FXPopup *pane; // Pane to pop up
42 protected:
43  FXMenuTitle(){}
44 private:
45  FXMenuTitle(const FXMenuTitle&);
46  FXMenuTitle &operator=(const FXMenuTitle&);
47 public:
48  long onPaint(FXObject*,FXSelector,void*);
49  long onEnter(FXObject*,FXSelector,void*);
50  long onLeave(FXObject*,FXSelector,void*);
51  long onLeftBtnPress(FXObject*,FXSelector,void*);
52  long onLeftBtnRelease(FXObject*,FXSelector,void*);
53  long onKeyPress(FXObject*,FXSelector,void*);
54  long onKeyRelease(FXObject*,FXSelector,void*);
55  long onHotKeyPress(FXObject*,FXSelector,void*);
56  long onHotKeyRelease(FXObject*,FXSelector,void*);
57  long onFocusUp(FXObject*,FXSelector,void*);
58  long onFocusDown(FXObject*,FXSelector,void*);
59  long onFocusIn(FXObject*,FXSelector,void*);
60  long onFocusOut(FXObject*,FXSelector,void*);
61  long onCmdPost(FXObject*,FXSelector,void*);
62  long onCmdUnpost(FXObject*,FXSelector,void*);
63 public:
64 
66  FXMenuTitle(FXComposite* p,const FXString& text,FXIcon* ic=NULL,FXPopup* pup=NULL,FXuint opts=0);
67 
69  virtual void create();
70 
72  virtual void detach();
73 
75  virtual FXint getDefaultWidth();
76 
78  virtual FXint getDefaultHeight();
79 
81  virtual FXbool canFocus() const;
82 
84  virtual void setFocus();
85 
87  virtual void killFocus();
88 
90  void setMenu(FXPopup *menu);
91 
93  FXPopup* getMenu() const { return pane; }
94 
96  virtual FXbool contains(FXint parentx,FXint parenty) const;
97 
99  virtual void save(FXStream& store) const;
100 
102  virtual void load(FXStream& store);
103 
105  virtual ~FXMenuTitle();
106  };
107 
108 }
109 
110 #endif

Copyright © 1997-2016 Jeroen van der Zijp