]> git.saurik.com Git - wxWidgets.git/blob - interface/wx/statline.h
Make storing non-trivial data in wxThreadSpecificInfo possible.
[wxWidgets.git] / interface / wx / statline.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: statline.h
3 // Purpose: interface of wxStaticLine
4 // Author: wxWidgets team
5 // Licence: wxWindows licence
6 /////////////////////////////////////////////////////////////////////////////
7
8 /**
9 @class wxStaticLine
10
11 A static line is just a line which may be used in a dialog to separate the
12 groups of controls.
13
14 The line may be only vertical or horizontal. Moreover, not all ports
15 (notably not wxGTK) support specifying the transversal direction of the
16 line (e.g. height for a horizontal line) so for maximal portability you
17 should specify it as wxDefaultCoord.
18
19 @beginStyleTable
20 @style{wxLI_HORIZONTAL}
21 Creates a horizontal line.
22 @style{wxLI_VERTICAL}
23 Creates a vertical line.
24 @endStyleTable
25
26 @library{wxcore}
27 @category{ctrl}
28
29 @see wxStaticBox
30 */
31 class wxStaticLine : public wxControl
32 {
33 public:
34 /**
35 Default constructor
36 */
37 wxStaticLine();
38
39 /**
40 Constructor, creating and showing a static line.
41
42 @param parent
43 Parent window. Must not be @NULL.
44 @param id
45 Window identifier. The value wxID_ANY indicates a default value.
46 @param pos
47 Window position.
48 If ::wxDefaultPosition is specified then a default position is chosen.
49 @param size
50 Size. Note that either the height or the width (depending on
51 whether the line if horizontal or vertical) is ignored.
52 @param style
53 Window style (either wxLI_HORIZONTAL or wxLI_VERTICAL).
54 @param name
55 Window name.
56
57 @see Create()
58 */
59 wxStaticLine(wxWindow* parent, wxWindowID id = wxID_ANY,
60 const wxPoint& pos = wxDefaultPosition,
61 const wxSize& size = wxDefaultSize,
62 long style = wxLI_HORIZONTAL,
63 const wxString& name = wxStaticLineNameStr);
64
65 /**
66 Creates the static line for two-step construction.
67 See wxStaticLine() for further details.
68 */
69 bool Create(wxWindow* parent, wxWindowID id = wxID_ANY,
70 const wxPoint& pos = wxDefaultPosition,
71 const wxSize& size = wxDefaultSize, long style = wxLI_HORIZONTAL,
72 const wxString& name = wxStaticLineNameStr);
73
74 /**
75 This static function returns the size which will be given to the smaller
76 dimension of the static line, i.e. its height for a horizontal line or its
77 width for a vertical one.
78 */
79 static int GetDefaultSize();
80
81 /**
82 Returns @true if the line is vertical, @false if horizontal.
83 */
84 bool IsVertical() const;
85 };
86