]> git.saurik.com Git - wxWidgets.git/blame - include/wx/generic/scrolwin.h
Applied patch [ 858324 ] Calling EndModal inside an EVT_INIT_DIALOG event handler
[wxWidgets.git] / include / wx / generic / scrolwin.h
CommitLineData
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$
371a5b4e
JS
8// Copyright: (c) Julian Smart
9// Licence: wxWindows licence
c801d85f
KB
10/////////////////////////////////////////////////////////////////////////////
11
8614c467
VZ
12#ifndef _WX_GENERIC_SCROLLWIN_H_
13#define _WX_GENERIC_SCROLLWIN_H_
c801d85f 14
12028905 15#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
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 26WXDLLEXPORT_DATA(extern const wxChar*) wxPanelNameStr;
c801d85f 27
8614c467 28// default scrolled window style
fa3541bd 29#ifndef wxScrolledWindowStyle
dc429f89 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
42class WXDLLEXPORT wxGenericScrolledWindow : public wxPanel,
43 public wxScrollHelper
c801d85f 44{
0cf5b099 45public:
1169a919 46 wxGenericScrolledWindow();
fa3541bd 47 wxGenericScrolledWindow(wxWindow *parent,
b935bec2 48 wxWindowID winid = -1,
8614c467
VZ
49 const wxPoint& pos = wxDefaultPosition,
50 const wxSize& size = wxDefaultSize,
51 long style = wxScrolledWindowStyle,
1169a919 52 const wxString& name = wxPanelNameStr);
c801d85f 53
1e6feb95 54 virtual ~wxGenericScrolledWindow();
c801d85f 55
8614c467 56 bool Create(wxWindow *parent,
b935bec2 57 wxWindowID winid,
8614c467
VZ
58 const wxPoint& pos = wxDefaultPosition,
59 const wxSize& size = wxDefaultSize,
60 long style = wxScrolledWindowStyle,
61 const wxString& name = wxPanelNameStr);
c801d85f 62
1e6feb95 63 virtual void PrepareDC(wxDC& dc) { DoPrepareDC(dc); }
ecab4dba 64
dc429f89 65 // lay out the window and its children
30486297
RD
66 virtual bool Layout();
67
2b5f62a0
VZ
68 virtual void DoSetVirtualSize(int x, int y);
69
349efbaa
VZ
70protected:
71 // this is needed for wxEVT_PAINT processing hack described in
72 // wxScrollHelperEvtHandler::ProcessEvent()
73 void OnPaint(wxPaintEvent& event);
74
0cf5b099
VZ
75 // we need to return a special WM_GETDLGCODE value to process just the
76 // arrows but let the other navigation characters through
77#ifdef __WXMSW__
78 virtual long MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
79#endif // __WXMSW__
80
ecab4dba 81private:
fc7a2a60 82 DECLARE_DYNAMIC_CLASS_NO_COPY(wxGenericScrolledWindow)
349efbaa 83 DECLARE_EVENT_TABLE()
c801d85f
KB
84};
85
1e6feb95
VZ
86#ifdef __VISUALC__
87 #pragma warning(default:4355)
88#endif
89
c801d85f 90#endif
8614c467 91 // _WX_GENERIC_SCROLLWIN_H_
566d84a7 92