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

FXMenuBar.h
Go to the documentation of this file.
1 /********************************************************************************
2 * *
3 * M e n u B a r W i d g e t *
4 * *
5 *********************************************************************************
6 * Copyright (C) 1998,2006 by Jeroen van der Zijp. All Rights Reserved. *
7 *********************************************************************************
8 * This library is free software; you can redistribute it and/or *
9 * modify it under the terms of the GNU Lesser General Public *
10 * License as published by the Free Software Foundation; either *
11 * version 2.1 of the License, or (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 GNU *
16 * Lesser General Public License for more details. *
17 * *
18 * You should have received a copy of the GNU Lesser General Public *
19 * License along with this library; if not, write to the Free Software *
20 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. *
21 *********************************************************************************
22 * $Id: FXMenuBar.h,v 1.15 2006/01/22 17:58:06 fox Exp $ *
23 ********************************************************************************/
24 #ifndef FXMENUBAR_H
25 #define FXMENUBAR_H
26 
27 #ifndef FXTOOLBAR_H
28 #include "FXToolBar.h"
29 #endif
30 
31 namespace FX {
32 
33 
34 /// Menu bar
35 class FXAPI FXMenuBar : public FXToolBar {
37 protected:
38  FXMenuBar(){}
39 private:
40  FXMenuBar(const FXMenuBar&);
41  FXMenuBar &operator=(const FXMenuBar&);
42 public:
43  long onFocusLeft(FXObject*,FXSelector,void*);
44  long onFocusRight(FXObject*,FXSelector,void*);
45  long onEnter(FXObject*,FXSelector,void*);
46  long onLeave(FXObject*,FXSelector,void*);
47  long onMotion(FXObject*,FXSelector,void*);
48  long onButtonPress(FXObject*,FXSelector,void*);
49  long onButtonRelease(FXObject*,FXSelector,void*);
50  long onCmdUnpost(FXObject*,FXSelector,void*);
51 public:
52 
53  /**
54  * Construct a floatable menubar
55  * Normally, the menubar is docked under window p.
56  * When floated, the menubar can be docked under window q, which is
57  * typically an FXToolbarShell window.
58  */
60 
61  /**
62  * Construct a non-floatable menubar.
63  * The menubar can not be undocked.
64  */
65  FXMenuBar(FXComposite* p,FXuint opts,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=3,FXint pr=3,FXint pt=2,FXint pb=2,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING);
66 
67  /// Returns true if specified coordinate (in parent's coordinate system) is in menubar
68  virtual bool contains(FXint parentx,FXint parenty) const;
69  };
70 
71 }
72 
73 #endif
unsigned int FXuint
Definition: fxdefs.h:389
FXuint FXSelector
Association key.
Definition: FXObject.h:53
#define FXAPI
Definition: fxdefs.h:122
Stretch or shrink horizontally.
Definition: FXWindow.h:62
Base composite.
Definition: FXComposite.h:35
Stick on top (default)
Definition: FXWindow.h:51
Definition: FX4Splitter.h:31
int FXint
Definition: fxdefs.h:390
Stick on left (default)
Definition: FXWindow.h:47
A tool bar widget can be docked in a dock site; it automatically adjusts its orientation based on the...
Definition: FXToolBar.h:42
Definition: FXPacker.h:38
Object is the base class for all objects in FOX; in order to receive messages from the user interface...
Definition: FXObject.h:166
Menu bar.
Definition: FXMenuBar.h:35
#define FXDECLARE(classname)
Macro to set up class declaration.
Definition: FXObject.h:92

Copyright © 1997-2005 Jeroen van der Zijp