Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 67 lines (61 sloc) 2.784 kb
45cf7d8c » lylejohnson
2009-02-02 initial checkin of r2610 from trunk
1 /***********************************************************************
2 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
3 * Copyright (c) 2001 by J. Lyle Johnson. All Rights Reserved.
4 *
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Lesser General Public
7 * License as published by the Free Software Foundation; either
8 * version 2.1 of the License, or (at your option) any later version.
9 *
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Lesser General Public License for more details.
14 *
15 * You should have received a copy of the GNU Lesser General Public
16 * License along with this library; if not, write to the Free Software
17 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
18 *
19 * For further information please contact the author by e-mail
a934547f » lylejohnson
2009-11-09 Replaced e-mail address "lyle@users.sourceforge.net" with
20 * at "lyle@lylejohnson.name".
45cf7d8c » lylejohnson
2009-02-02 initial checkin of r2610 from trunk
21 ***********************************************************************/
22
bea4cade »
2012-02-02 Strip all whitespaces on line endings
23 /// Menu bar
45cf7d8c » lylejohnson
2009-02-02 initial checkin of r2610 from trunk
24 class FXMenuBar : public FXToolBar {
25 protected:
26 FXMenuBar(){}
27 public:
28 long onFocusLeft(FXObject*,FXSelector,void* PTR_EVENT);
29 long onFocusRight(FXObject*,FXSelector,void* PTR_EVENT);
30 long onEnter(FXObject*,FXSelector,void* PTR_EVENT);
31 long onLeave(FXObject*,FXSelector,void* PTR_EVENT);
32 long onMotion(FXObject*,FXSelector,void* PTR_EVENT);
33 long onButtonPress(FXObject*,FXSelector,void* PTR_IGNORE);
34 long onButtonRelease(FXObject*,FXSelector,void* PTR_EVENT);
35 long onCmdUnpost(FXObject*,FXSelector,void* PTR_IGNORE);
36 public:
37
38 %extend {
39 /**
bea4cade »
2012-02-02 Strip all whitespaces on line endings
40 * Construct a floatable menubar
45cf7d8c » lylejohnson
2009-02-02 initial checkin of r2610 from trunk
41 * Normally, the menubar is docked under window p.
42 * When floated, the menubar can be docked under window q, which is
43 * typically an FXToolBarShell window.
44 */
45 FXMenuBar(FXComposite* p,FXComposite* q,FXuint opts=LAYOUT_TOP|LAYOUT_LEFT|LAYOUT_FILL_X,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){
46 return new FXRbMenuBar(p,q,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
47 }
48
49 /**
50 * Construct a non-floatable menubar.
51 * The menubar can not be undocked.
52 */
53 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){
54 return new FXRbMenuBar(p,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
55 }
56 }
bea4cade »
2012-02-02 Strip all whitespaces on line endings
57
45cf7d8c » lylejohnson
2009-02-02 initial checkin of r2610 from trunk
58 // Destructor
59 virtual ~FXMenuBar();
60 };
61
62
63 DECLARE_FXOBJECT_VIRTUALS(FXMenuBar)
64 DECLARE_FXID_VIRTUALS(FXMenuBar)
65 DECLARE_FXDRAWABLE_VIRTUALS(FXMenuBar)
66 DECLARE_FXWINDOW_VIRTUALS(FXMenuBar)
67 DECLARE_FXDOCKBAR_VIRTUALS(FXMenuBar)
Something went wrong with that request. Please try again.