]> git.saurik.com Git - wxWidgets.git/blob - docs/latex/wx/hscrolledwindow.tex
fix include file syntax
[wxWidgets.git] / docs / latex / wx / hscrolledwindow.tex
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
14 In the name of this class, "H" stands for "horizontal" because it can be
15 used for scrolling columns of variable widths. It is not necessary to know
16 the widths of all columns in advance -- only those which are shown on the
17 screen need to be measured.
18
19 In any case, this is a generalization of the
20 \helpref{wxScrolledWindow}{wxscrolledwindow} class which can be only used when
21 all columns have the same widths. It lacks some other wxScrolledWindow features
22 however, notably it can't scroll only a rectangle of the window and not its
23 entire client area.
24
25 To use this class, you need to derive from it and implement the
26 \helpref{OnGetColumnWidth()}{wxvarhscrollhelperongetcolumnwidth} pure virtual
27 method. You also must call \helpref{SetColumnCount()}{wxvarhscrollhelpersetcolumncount}
28 to let the base class know how many columns it should display, but from that
29 moment on the scrolling is handled entirely by wxHScrolledWindow. You only
30 need to draw the visible part of contents in your {\tt OnPaint()} method as
31 usual. You should use \helpref{GetVisibleColumnsBegin()}{wxvarhscrollhelpergetvisiblecolumnsbegin}
32 and \helpref{GetVisibleColumnsEnd()}{wxvarhscrollhelpergetvisiblecolumnsend} to
33 select the lines to display. Note that the device context origin is not shifted
34 so the first visible column always appears at the point $(0, 0)$ in physical as
35 well 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{Library}
52
53 \helpref{wxCore}{librarieslist}
54
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
67 Default constructor, you must call \helpref{Create()}{wxhscrolledwindowcreate}
68 later.
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
72 This is the normal constructor, no need to call {\tt Create()} after using this one.
73
74 Note that {\tt wxHSCROLL} is always automatically added to our style, there is
75 no 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
88 this 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
97 Same as the \helpref{non-default constuctor}{wxhscrolledwindowwxhscrolledwindow}
98 but returns status code: {\tt true} if ok, {\tt false} if the window couldn't
99 be created.
100
101 Just as with the constructor above, the {\tt wxHSCROLL} style is always used,
102 there is no need to specify it explicitly.
103