]>
Commit | Line | Data |
---|---|---|
1 | ///////////////////////////////////////////////////////////////////////////// | |
2 | // Name: wx/msw/statbox.h | |
3 | // Purpose: wxStaticBox class | |
4 | // Author: Julian Smart | |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // Copyright: (c) Julian Smart | |
8 | // Licence: wxWindows licence | |
9 | ///////////////////////////////////////////////////////////////////////////// | |
10 | ||
11 | #ifndef _WX_MSW_STATBOX_H_ | |
12 | #define _WX_MSW_STATBOX_H_ | |
13 | ||
14 | // Group box | |
15 | class WXDLLIMPEXP_CORE wxStaticBox : public wxStaticBoxBase | |
16 | { | |
17 | public: | |
18 | wxStaticBox() { } | |
19 | ||
20 | wxStaticBox(wxWindow *parent, wxWindowID id, | |
21 | const wxString& label, | |
22 | const wxPoint& pos = wxDefaultPosition, | |
23 | const wxSize& size = wxDefaultSize, | |
24 | long style = 0, | |
25 | const wxString& name = wxStaticBoxNameStr) | |
26 | { | |
27 | Create(parent, id, label, pos, size, style, name); | |
28 | } | |
29 | ||
30 | bool Create(wxWindow *parent, wxWindowID id, | |
31 | const wxString& label, | |
32 | const wxPoint& pos = wxDefaultPosition, | |
33 | const wxSize& size = wxDefaultSize, | |
34 | long style = 0, | |
35 | const wxString& name = wxStaticBoxNameStr); | |
36 | ||
37 | /// Implementation only | |
38 | virtual void GetBordersForSizer(int *borderTop, int *borderOther) const; | |
39 | ||
40 | virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const; | |
41 | ||
42 | // returns true if the platform should explicitly apply a theme border | |
43 | virtual bool CanApplyThemeBorder() const { return false; } | |
44 | ||
45 | protected: | |
46 | virtual wxSize DoGetBestSize() const; | |
47 | ||
48 | #ifndef __WXWINCE__ | |
49 | public: | |
50 | virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam); | |
51 | ||
52 | protected: | |
53 | // return the region with all the windows inside this static box excluded | |
54 | virtual WXHRGN MSWGetRegionWithoutChildren(); | |
55 | ||
56 | // remove the parts which are painted by static box itself from the given | |
57 | // region which is embedded in a rectangle (0, 0)-(w, h) | |
58 | virtual void MSWGetRegionWithoutSelf(WXHRGN hrgn, int w, int h); | |
59 | ||
60 | // paint the given rectangle with our background brush/colour | |
61 | virtual void PaintBackground(wxDC& dc, const struct tagRECT& rc); | |
62 | // paint the foreground of the static box | |
63 | virtual void PaintForeground(wxDC& dc, const struct tagRECT& rc); | |
64 | ||
65 | void OnPaint(wxPaintEvent& event); | |
66 | #endif // !__WXWINCE__ | |
67 | ||
68 | DECLARE_DYNAMIC_CLASS_NO_COPY(wxStaticBox) | |
69 | }; | |
70 | ||
71 | #endif // _WX_MSW_STATBOX_H_ | |
72 |