]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/hscrolledwindow.tex
Fix "depreciated" to "deprecated".
[wxWidgets.git] / docs / latex / wx / hscrolledwindow.tex
CommitLineData
f18eaf26
VZ
1%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
2%% Name: hscrolledwindow.tex
3%% Purpose: wxHScrolledWindow Documentation
4%% Author: Bryan Petty
5%% Modified by:
6%% Created: 2007-04-04
7%% RCS-ID: $Id$
8%% Copyright: (c) 2007 wxWidgets Team
9%% License: wxWindows Licence
10%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
11
12\section{\class{wxHScrolledWindow}}\label{wxhscrolledwindow}
13
14In the name of this class, "H" stands for "horizontal" because it can be
15used for scrolling columns of variable widths. It is not necessary to know
16the widths of all columns in advance -- only those which are shown on the
17screen need to be measured.
18
19In any case, this is a generalization of the
20\helpref{wxScrolledWindow}{wxscrolledwindow} class which can be only used when
21all columns have the same widths. It lacks some other wxScrolledWindow features
22however, notably it can't scroll only a rectangle of the window and not its
23entire client area.
24
25To use this class, you need to derive from it and implement the
26\helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} pure virtual
27method. You also must call \helpref{SetColumnCount()}{wxvarhscrollhelpersetcolumncount}
28to let the base class know how many columns it should display, but from that
29moment on the scrolling is handled entirely by wxHScrolledWindow. You only
30need to draw the visible part of contents in your {\tt OnPaint()} method as
31usual. You should use \helpref{GetVisibleColumnsBegin()}{wxvarhscrollhelpergetvisiblecolumnsbegin}
32and \helpref{GetVisibleColumnsEnd()}{wxvarhscrollhelpergetvisiblecolumnsend} to
33select the lines to display. Note that the device context origin is not shifted
34so the first visible column always appears at the point $(0, 0)$ in physical as
35well as logical coordinates.
36
37\wxheading{Derived from}
38
39\helpref{wxPanel}{wxpanel}\\
40\helpref{wxWindow}{wxwindow}\\
41\helpref{wxEvtHandler}{wxevthandler}\\
42\helpref{wxObject}{wxobject}
43
44\helpref{wxVarHScrollHelper}{wxvarhscrollhelper}\\
45\helpref{wxVarScrollHelperBase}{wxvarscrollhelperbase}
46
47\wxheading{Include files}
48
49<wx/vscroll.h>
50
51\wxheading{See also}
52
53\helpref{wxHVScrolledWindow}{wxhvscrolledwindow},
54\rtfsp\helpref{wxVScrolledWindow}{wxvscrolledwindow}
55
56\latexignore{\rtfignore{\wxheading{Members}}}
57
58
59\membersection{wxHScrolledWindow::wxHScrolledWindow}\label{wxhscrolledwindowwxhscrolledwindow}
60
61\func{}{wxHScrolledWindow}{\void}
62
63Default constructor, you must call \helpref{Create()}{wxhscrolledwindowcreate}
64later.
65
66\func{}{wxHScrolledWindow}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
67
68This is the normal constructor, no need to call {\tt Create()} after using this one.
69
70Note that {\tt wxHSCROLL} is always automatically added to our style, there is
71no need to specify it explicitly.
72
73\wxheading{Parameters}
74
75\docparam{parent}{The parent window, must not be {\tt NULL}}
76
77\docparam{id}{The identifier of this window, {\tt wxID\_ANY} by default}
78
79\docparam{pos}{The initial window position}
80
81\docparam{size}{The initial window size}
82
83\docparam{style}{The window style. There are no special style bits defined for
84this class.}
85
86\docparam{name}{The name for this window; usually not used}
87
88
89\membersection{wxHScrolledWindow::Create}\label{wxhscrolledwindowcreate}
90
91\func{bool}{Create}{\param{wxWindow* }{parent}, \param{wxWindowID }{id = wxID\_ANY}, \param{const wxPoint\& }{pos = wxDefaultPosition}, \param{const wxSize\& }{size = wxDefaultSize}, \param{long }{style = 0}, \param{const wxString\& }{name = wxPanelNameStr}}
92
93Same as the \helpref{non-default constuctor}{wxhscrolledwindowwxhscrolledwindow}
94but returns status code: {\tt true} if ok, {\tt false} if the window couldn't
95be created.
96
97Just as with the constructor above, the {\tt wxHSCROLL} style is always used,
98there is no need to specify it explicitly.
99