]>
Commit | Line | Data |
---|---|---|
c801d85f | 1 | ///////////////////////////////////////////////////////////////////////////// |
8614c467 | 2 | // Name: wx/generic/scrolwin.h |
1e6feb95 | 3 | // Purpose: wxGenericScrolledWindow class |
c801d85f KB |
4 | // Author: Julian Smart |
5 | // Modified by: | |
6 | // Created: 01/02/97 | |
7 | // RCS-ID: $Id$ | |
8 | // Copyright: (c) Julian Smart and Markus Holzem | |
8614c467 | 9 | // Licence: wxWindows license |
c801d85f KB |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
8614c467 VZ |
12 | #ifndef _WX_GENERIC_SCROLLWIN_H_ |
13 | #define _WX_GENERIC_SCROLLWIN_H_ | |
c801d85f KB |
14 | |
15 | #ifdef __GNUG__ | |
3379ed37 | 16 | #pragma interface "genscrolwin.h" |
c801d85f KB |
17 | #endif |
18 | ||
8614c467 VZ |
19 | // ---------------------------------------------------------------------------- |
20 | // headers and constants | |
21 | // ---------------------------------------------------------------------------- | |
22 | ||
c801d85f | 23 | #include "wx/window.h" |
053f9cc1 | 24 | #include "wx/panel.h" |
c801d85f | 25 | |
908d4516 | 26 | WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr; |
c801d85f | 27 | |
8614c467 | 28 | // default scrolled window style |
fa3541bd | 29 | #ifndef wxScrolledWindowStyle |
a99b3d76 | 30 | #define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL) |
fa3541bd | 31 | #endif |
8614c467 | 32 | |
1e6feb95 VZ |
33 | // avoid triggering this stupid VC++ warning |
34 | #ifdef __VISUALC__ | |
35 | #pragma warning(disable:4355) // 'this' used in base member initializer list | |
36 | #endif | |
37 | ||
8614c467 | 38 | // ---------------------------------------------------------------------------- |
fa3541bd | 39 | // wxGenericScrolledWindow |
8614c467 VZ |
40 | // ---------------------------------------------------------------------------- |
41 | ||
1e6feb95 VZ |
42 | class WXDLLEXPORT wxGenericScrolledWindow : public wxPanel, |
43 | public wxScrollHelper | |
c801d85f | 44 | { |
9806a47c | 45 | public: |
1e6feb95 | 46 | wxGenericScrolledWindow() : wxScrollHelper(this) { } |
fa3541bd | 47 | wxGenericScrolledWindow(wxWindow *parent, |
8614c467 VZ |
48 | wxWindowID id = -1, |
49 | const wxPoint& pos = wxDefaultPosition, | |
50 | const wxSize& size = wxDefaultSize, | |
51 | long style = wxScrolledWindowStyle, | |
52 | const wxString& name = wxPanelNameStr) | |
1e6feb95 | 53 | : wxScrollHelper(this) |
ecab4dba | 54 | { |
8614c467 | 55 | Create(parent, id, pos, size, style, name); |
ecab4dba | 56 | } |
c801d85f | 57 | |
1e6feb95 | 58 | virtual ~wxGenericScrolledWindow(); |
c801d85f | 59 | |
8614c467 VZ |
60 | bool Create(wxWindow *parent, |
61 | wxWindowID id, | |
62 | const wxPoint& pos = wxDefaultPosition, | |
63 | const wxSize& size = wxDefaultSize, | |
64 | long style = wxScrolledWindowStyle, | |
65 | const wxString& name = wxPanelNameStr); | |
c801d85f | 66 | |
1e6feb95 | 67 | virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); } |
ecab4dba | 68 | |
349efbaa VZ |
69 | protected: |
70 | // this is needed for wxEVT_PAINT processing hack described in | |
71 | // wxScrollHelperEvtHandler::ProcessEvent() | |
72 | void OnPaint(wxPaintEvent& event); | |
73 | ||
ecab4dba | 74 | private: |
fa3541bd | 75 | DECLARE_ABSTRACT_CLASS(wxGenericScrolledWindow) |
349efbaa | 76 | DECLARE_EVENT_TABLE() |
c801d85f KB |
77 | }; |
78 | ||
1e6feb95 VZ |
79 | #ifdef __VISUALC__ |
80 | #pragma warning(default:4355) | |
81 | #endif | |
82 | ||
c801d85f | 83 | #endif |
8614c467 | 84 | // _WX_GENERIC_SCROLLWIN_H_ |