1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/generic/scrolwin.h
3 // Purpose: wxGenericScrolledWindow class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_GENERIC_SCROLLWIN_H_
13 #define _WX_GENERIC_SCROLLWIN_H_
15 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
16 #pragma interface "genscrolwin.h"
19 // ----------------------------------------------------------------------------
20 // headers and constants
21 // ----------------------------------------------------------------------------
23 #include "wx/window.h"
26 WXDLLEXPORT_DATA(extern const wxChar
*) wxPanelNameStr
;
28 // default scrolled window style
29 #ifndef wxScrolledWindowStyle
30 #define wxScrolledWindowStyle (wxHSCROLL | wxVSCROLL)
33 // avoid triggering this stupid VC++ warning
35 #pragma warning(disable:4355) // 'this' used in base member initializer list
38 // ----------------------------------------------------------------------------
39 // wxGenericScrolledWindow
40 // ----------------------------------------------------------------------------
42 class WXDLLEXPORT wxGenericScrolledWindow
: public wxPanel
,
46 wxGenericScrolledWindow();
47 wxGenericScrolledWindow(wxWindow
*parent
,
48 wxWindowID winid
= -1,
49 const wxPoint
& pos
= wxDefaultPosition
,
50 const wxSize
& size
= wxDefaultSize
,
51 long style
= wxScrolledWindowStyle
,
52 const wxString
& name
= wxPanelNameStr
);
54 virtual ~wxGenericScrolledWindow();
56 bool Create(wxWindow
*parent
,
58 const wxPoint
& pos
= wxDefaultPosition
,
59 const wxSize
& size
= wxDefaultSize
,
60 long style
= wxScrolledWindowStyle
,
61 const wxString
& name
= wxPanelNameStr
);
63 virtual void PrepareDC(wxDC
& dc
) { DoPrepareDC(dc
); }
65 // lay out the window and its children
66 virtual bool Layout();
68 virtual void DoSetVirtualSize(int x
, int y
);
71 // this is needed for wxEVT_PAINT processing hack described in
72 // wxScrollHelperEvtHandler::ProcessEvent()
73 void OnPaint(wxPaintEvent
& event
);
75 // we need to return a special WM_GETDLGCODE value to process just the
76 // arrows but let the other navigation characters through
78 virtual long MSWWindowProc(WXUINT nMsg
, WXWPARAM wParam
, WXLPARAM lParam
);
82 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericScrolledWindow
)
87 #pragma warning(default:4355)
91 // _WX_GENERIC_SCROLLWIN_H_