Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 95 lines (79 sloc) 3.31 kb
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
1 /***********************************************************************
2 * FXRuby -- the Ruby language bindings for the FOX GUI toolkit.
b8219ec @lylejohnson Updated copyright notice for all SWIG interface files
lylejohnson authored
3 * Copyright (c) 2001-2009 by Lyle Johnson. All Rights Reserved.
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
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
a934547 @lylejohnson Replaced e-mail address "lyle@users.sourceforge.net" with
lylejohnson authored
20 * at "lyle@lylejohnson.name".
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
21 ***********************************************************************/
22
23 // Group box options
24 enum {
25 GROUPBOX_TITLE_LEFT = 0, /// Title is left-justified
26 GROUPBOX_TITLE_CENTER = 0x00040000, /// Title is centered
27 GROUPBOX_TITLE_RIGHT = 0x00080000, /// Title is right-justified
28 GROUPBOX_NORMAL = GROUPBOX_TITLE_LEFT
29 };
30
31
bea4cad @larskanis Strip all whitespaces on line endings
authored
32 /**
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
33 * A group box widget provides a nice raised or sunken border
34 * around a group of widgets, providing a visual delineation.
35 * Typically, a title is placed over the border to provide some
36 * clarification.
37 * Radio buttons placed inside a group box automatically assume
38 * mutually exclusive behaviour, i.e. at most one radio button will
39 * be checked at any one time.
40 */
41 class FXGroupBox : public FXPacker {
42 protected:
bea4cad @larskanis Strip all whitespaces on line endings
authored
43 FXString label;
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
44 FXFont *font;
45 FXColor textColor;
46 protected:
47 FXGroupBox();
48 public:
49 long onPaint(FXObject*,FXSelector,void* PTR_EVENT);
50 long onCmdSetValue(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
51 long onCmdSetStringValue(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
52 long onCmdGetStringValue(FXObject*,FXSelector,void* PTR_IGNORE); // FIXME
53 public:
54 %extend {
55 /// Construct group box layout manager
56 FXGroupBox(FXComposite* p,const FXString& text,FXuint opts=GROUPBOX_NORMAL,FXint x=0,FXint y=0,FXint w=0,FXint h=0,FXint pl=DEFAULT_SPACING,FXint pr=DEFAULT_SPACING,FXint pt=DEFAULT_SPACING,FXint pb=DEFAULT_SPACING,FXint hs=DEFAULT_SPACING,FXint vs=DEFAULT_SPACING){
57 return new FXRbGroupBox(p,text,opts,x,y,w,h,pl,pr,pt,pb,hs,vs);
58 }
59 }
60
61 /// Change group box title text
62 void setText(const FXString& text);
63
64 /// Return current groupbox title text
65 FXString getText() const;
66
67 /// Change group box style
68 void setGroupBoxStyle(FXuint style);
69
70 /// Return current group box style
71 FXuint getGroupBoxStyle() const;
72
73 /// Change title font
74 void setFont(FXFont* fnt);
75
76 /// Return title font
77 FXFont* getFont() const;
78
79 /// Change title text color
80 void setTextColor(FXColor clr);
81
82 /// Return text color
83 FXColor getTextColor() const;
bea4cad @larskanis Strip all whitespaces on line endings
authored
84
45cf7d8 @lylejohnson initial checkin of r2610 from trunk
lylejohnson authored
85 /// Destructor
86 virtual ~FXGroupBox();
87 };
88
89
90 DECLARE_FXOBJECT_VIRTUALS(FXGroupBox)
91 DECLARE_FXID_VIRTUALS(FXGroupBox)
92 DECLARE_FXDRAWABLE_VIRTUALS(FXGroupBox)
93 DECLARE_FXWINDOW_VIRTUALS(FXGroupBox)
94
Something went wrong with that request. Please try again.