]>
Commit | Line | Data |
---|---|---|
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{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 | ||
63 | Default constructor, you must call \helpref{Create()}{wxhscrolledwindowcreate} | |
64 | later. | |
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 | ||
68 | This is the normal constructor, no need to call {\tt Create()} after using this one. | |
69 | ||
70 | Note that {\tt wxHSCROLL} is always automatically added to our style, there is | |
71 | no 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 | |
84 | this 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 | ||
93 | Same as the \helpref{non-default constuctor}{wxhscrolledwindowwxhscrolledwindow} | |
94 | but returns status code: {\tt true} if ok, {\tt false} if the window couldn't | |
95 | be created. | |
96 | ||
97 | Just as with the constructor above, the {\tt wxHSCROLL} style is always used, | |
98 | there is no need to specify it explicitly. | |
99 |