]> git.saurik.com Git - wxWidgets.git/blame - docs/latex/wx/hscrolledwindow.tex
don't use _T() inside wxGetTranslation() and related macros (wxTRANSLATE, _, ......
[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
a7af285d
VZ
51\wxheading{Library}
52
53\helpref{wxCore}{librarieslist}
54
f18eaf26
VZ
55\wxheading{See also}
56
57\helpref{wxHVScrolledWindow}{wxhvscrolledwindow},
58\rtfsp\helpref{wxVScrolledWindow}{wxvscrolledwindow}
59
60\latexignore{\rtfignore{\wxheading{Members}}}
61
62
63\membersection{wxHScrolledWindow::wxHScrolledWindow}\label{wxhscrolledwindowwxhscrolledwindow}
64
65\func{}{wxHScrolledWindow}{\void}
66
67Default constructor, you must call \helpref{Create()}{wxhscrolledwindowcreate}
68later.
69
70\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}}
71
72This is the normal constructor, no need to call {\tt Create()} after using this one.
73
74Note that {\tt wxHSCROLL} is always automatically added to our style, there is
75no need to specify it explicitly.
76
77\wxheading{Parameters}
78
79\docparam{parent}{The parent window, must not be {\tt NULL}}
80
81\docparam{id}{The identifier of this window, {\tt wxID\_ANY} by default}
82
83\docparam{pos}{The initial window position}
84
85\docparam{size}{The initial window size}
86
87\docparam{style}{The window style. There are no special style bits defined for
88this class.}
89
90\docparam{name}{The name for this window; usually not used}
91
92
93\membersection{wxHScrolledWindow::Create}\label{wxhscrolledwindowcreate}
94
95\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}}
96
97Same as the \helpref{non-default constuctor}{wxhscrolledwindowwxhscrolledwindow}
98but returns status code: {\tt true} if ok, {\tt false} if the window couldn't
99be created.
100
101Just as with the constructor above, the {\tt wxHSCROLL} style is always used,
102there is no need to specify it explicitly.
103