MySQL Workbench  6.1
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
box.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2008, 2013, Oracle and/or its affiliates. All rights reserved.
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License as
6  * published by the Free Software Foundation; version 2 of the
7  * License.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
17  * 02110-1301 USA
18  */
19 #ifndef _MFORMS_BOX_H_
20 #define _MFORMS_BOX_H_
21 
22 #include <mforms/container.h>
23 #include <map>
24 
25 namespace mforms {
26 
27  class Box;
28  class Button;
29 
30 #ifndef DOXYGEN_SHOULD_SKIP_THIS
31 #ifndef SWIG
32  struct BoxImplPtrs
33  {
34  bool (*create)(Box *self, bool horizontal);
35  void (*add)(Box *self, View *child, bool expand, bool fill);
36  void (*add_end)(Box *self, View *child, bool expand, bool fill);
37  void (*remove)(Box *self, View *child);
38  void (*set_homogeneous)(Box *self, bool);
39  void (*set_spacing)(Box *self, int);
40  };
41 #endif
42 #endif
43 
50  class MFORMS_EXPORT Box : public Container
51  {
52  public:
58  Box(bool horiz);
59 
68  void add(View *subview, bool expand, bool fill= false);
77  void add_end(View *subview, bool expand, bool fill= false);
78 
80  virtual void remove(View *subview);
81 
83  void set_homogeneous(bool flag);
84 
86  void set_spacing(int space);
87 
89  bool is_horizontal();
90  protected:
91  BoxImplPtrs *_box_impl;
93  };
94 
95 };
96 
97 #endif /* _MFORMS_BOX_H_ */
BoxImplPtrs * _box_impl
Definition: box.h:91
Places child views sequentially in a vertical or horizontal layout.
Definition: box.h:50
#define MFORMS_EXPORT
Definition: base.h:33
Intermediate class used to collectively check for containers and later maybe implement special contai...
Definition: container.h:31
bool _is_horizontal
Definition: box.h:92
MySQL Workbench 6.1 documentation