Fixed wxScrolledWindow references to properly link (and appropriately changed others to wxScrolled).
Initial reviews of a few d* interface headers in this commit as well. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53241 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -160,9 +160,9 @@ ALIASES += itemdef{10}="<tr><td><span class='itemdef'>\1</span></td> <td>\2,\3,\
|
|||||||
ALIASES += endDefList="</table>"
|
ALIASES += endDefList="</table>"
|
||||||
|
|
||||||
# See ENABLED_SECTIONS configuration key for more info about these:
|
# See ENABLED_SECTIONS configuration key for more info about these:
|
||||||
ALIASES += beginWxPerlOnly="\if WXPERL_MANUAL \n <b>wxPerl Note:</b>\n\n"
|
ALIASES += beginWxPerlOnly="\if WXPERL_MANUAL <b>wxPerl Note:</b> "
|
||||||
ALIASES += endWxPerlOnly="\endif"
|
ALIASES += endWxPerlOnly="\endif"
|
||||||
ALIASES += beginWxPythonOnly="\if WXPYTHON_MANUAL \n <b>wxPython Note:</b>\n\n"
|
ALIASES += beginWxPythonOnly="\if WXPYTHON_MANUAL <b>wxPython Note:</b> "
|
||||||
ALIASES += endWxPythonOnly="\endif"
|
ALIASES += endWxPythonOnly="\endif"
|
||||||
|
|
||||||
# This is to get around a bug in Doxygen that prevents use of '{' or '}'
|
# This is to get around a bug in Doxygen that prevents use of '{' or '}'
|
||||||
|
@@ -71,9 +71,8 @@ The following are the most important window classes
|
|||||||
@li wxWindow: base class for all windows and controls
|
@li wxWindow: base class for all windows and controls
|
||||||
@li wxControl: base class (mostly) for native controls/widgets
|
@li wxControl: base class (mostly) for native controls/widgets
|
||||||
@li wxPanel: window which can smartly manage child windows
|
@li wxPanel: window which can smartly manage child windows
|
||||||
@li wxScrolledWindow: Window with automatically managed scrollbars (see wxScrolled)
|
@li ::wxScrolledWindow: Window with automatically managed scrollbars (see
|
||||||
@li wxVScrolledWindow: As wxScrolledWindow but supports lines of variable
|
wxScrolled)
|
||||||
height
|
|
||||||
@li wxTopLevelWindow: Any top level window, dialog or frame
|
@li wxTopLevelWindow: Any top level window, dialog or frame
|
||||||
|
|
||||||
|
|
||||||
@@ -208,7 +207,14 @@ platform-dependent.
|
|||||||
The following are a variety of classes that are derived from wxWindow.
|
The following are a variety of classes that are derived from wxWindow.
|
||||||
|
|
||||||
@li wxPanel: A window whose colour changes according to current user settings
|
@li wxPanel: A window whose colour changes according to current user settings
|
||||||
@li wxScrolledWindow: Window with automatically managed scrollbars
|
@li ::wxScrolledWindow: Window with automatically managed scrollbars (see
|
||||||
|
wxScrolled)
|
||||||
|
@li wxHScrolledWindow: As ::wxScrolledWindow but supports columns of variable
|
||||||
|
widths
|
||||||
|
@li wxVScrolledWindow: As ::wxScrolledWindow but supports rows of variable
|
||||||
|
heights
|
||||||
|
@li wxHVScrolledWindow: As ::wxScrolledWindow but supports scroll units of
|
||||||
|
variable sizes.
|
||||||
@li wxGrid: A grid (table) window
|
@li wxGrid: A grid (table) window
|
||||||
@li wxSplitterWindow: Window which can be split vertically or horizontally
|
@li wxSplitterWindow: Window which can be split vertically or horizontally
|
||||||
@li wxStatusBar: Implements the status bar on a frame
|
@li wxStatusBar: Implements the status bar on a frame
|
||||||
@@ -220,8 +226,6 @@ The following are a variety of classes that are derived from wxWindow.
|
|||||||
@li wxSashWindow: Window with four optional sashes that can be dragged
|
@li wxSashWindow: Window with four optional sashes that can be dragged
|
||||||
@li wxSashLayoutWindow: Window that can be involved in an IDE-like layout
|
@li wxSashLayoutWindow: Window that can be involved in an IDE-like layout
|
||||||
arrangement
|
arrangement
|
||||||
@li wxVScrolledWindow: As wxScrolledWindow but supports lines of variable
|
|
||||||
height
|
|
||||||
@li wxWizardPage: A base class for the page in wizard dialog.
|
@li wxWizardPage: A base class for the page in wizard dialog.
|
||||||
@li wxWizardPageSimple: A page in wizard dialog.
|
@li wxWizardPageSimple: A page in wizard dialog.
|
||||||
|
|
||||||
|
@@ -462,7 +462,7 @@ renderer and also how to write a shared library
|
|||||||
|
|
||||||
@section page_samples_scrollsub Scroll subwindow sample
|
@section page_samples_scrollsub Scroll subwindow sample
|
||||||
|
|
||||||
This sample demonstrates use of the wxScrolledWindow
|
This sample demonstrates use of the ::wxScrolledWindow
|
||||||
class including placing subwindows into it and drawing simple graphics. It uses the
|
class including placing subwindows into it and drawing simple graphics. It uses the
|
||||||
SetTargetWindow method and thus the effect
|
SetTargetWindow method and thus the effect
|
||||||
of scrolling does not show in the scrolled window itself, but in one of its subwindows.
|
of scrolling does not show in the scrolled window itself, but in one of its subwindows.
|
||||||
|
@@ -67,7 +67,7 @@ within wxDialog::Show or wxDialog::ShowModal:
|
|||||||
@li If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer)
|
@li If that search failed too, wxWidgets finds 'loose' standard buttons (in any kind of sizer)
|
||||||
and adds them to a wxStdDialogButtonSizer.
|
and adds them to a wxStdDialogButtonSizer.
|
||||||
If no standard buttons were found, the whole dialog content will scroll.
|
If no standard buttons were found, the whole dialog content will scroll.
|
||||||
@li All the children apart from standard buttons are reparented onto a new wxScrolledWindow
|
@li All the children apart from standard buttons are reparented onto a new ::wxScrolledWindow
|
||||||
object, using the old top-level sizer for the scrolled window and creating a new top-level
|
object, using the old top-level sizer for the scrolled window and creating a new top-level
|
||||||
sizer to lay out the scrolled window and standard button sizer.
|
sizer to lay out the scrolled window and standard button sizer.
|
||||||
|
|
||||||
|
@@ -45,7 +45,7 @@ There is a generic wxHtmlParser class, independent of wxHtmlWindow.
|
|||||||
|
|
||||||
First of all, you must include @c wx/wxhtml.h.
|
First of all, you must include @c wx/wxhtml.h.
|
||||||
|
|
||||||
Class wxHtmlWindow (derived from wxScrolledWindow) is used to display HTML documents.
|
Class wxHtmlWindow (derived from ::wxScrolledWindow) is used to display HTML documents.
|
||||||
|
|
||||||
It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage.
|
It has two important methods: wxHtmlWindow::LoadPage and wxHtmlWindow::SetPage.
|
||||||
LoadPage loads and displays HTML file while SetPage displays directly the
|
LoadPage loads and displays HTML file while SetPage displays directly the
|
||||||
@@ -65,7 +65,7 @@ See wxHtmlHelpController.
|
|||||||
|
|
||||||
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
|
@subsection overview_html_quickstart_settingup Setting up wxHtmlWindow
|
||||||
|
|
||||||
Because wxHtmlWindow is derived from wxScrolledWindow and not from
|
Because wxHtmlWindow is derived from ::wxScrolledWindow and not from
|
||||||
wxFrame, it doesn't have visible frame. But the user usually wants to see
|
wxFrame, it doesn't have visible frame. But the user usually wants to see
|
||||||
the title of HTML page displayed somewhere and the frame's titlebar is
|
the title of HTML page displayed somewhere and the frame's titlebar is
|
||||||
the ideal place for it.
|
the ideal place for it.
|
||||||
|
@@ -415,7 +415,7 @@ spec over time.
|
|||||||
@li wxScreenDC
|
@li wxScreenDC
|
||||||
@li wxScrollBar
|
@li wxScrollBar
|
||||||
@li wxScrollEvent
|
@li wxScrollEvent
|
||||||
@li wxScrolledWindow
|
@li ::wxScrolledWindow
|
||||||
@li wxScrollWinEvent
|
@li wxScrollWinEvent
|
||||||
@li wxShowEvent
|
@li wxShowEvent
|
||||||
@li wxSingleChoiceDialog
|
@li wxSingleChoiceDialog
|
||||||
|
@@ -12,7 +12,7 @@
|
|||||||
|
|
||||||
Classes:
|
Classes:
|
||||||
@li wxWindow
|
@li wxWindow
|
||||||
@li wxScrolledWindow
|
@li ::wxScrolledWindow
|
||||||
@li wxScrollBar
|
@li wxScrollBar
|
||||||
|
|
||||||
@li @ref overview_scrolling_model
|
@li @ref overview_scrolling_model
|
||||||
@@ -35,7 +35,7 @@ events. If you created a wxWindow object with scrollbars, and then clicked on
|
|||||||
the scrollbars, nothing at all would happen. This is deliberate, because the
|
the scrollbars, nothing at all would happen. This is deliberate, because the
|
||||||
@e interpretation of scroll events varies from one window class to another.
|
@e interpretation of scroll events varies from one window class to another.
|
||||||
|
|
||||||
wxScrolledWindow (formerly wxCanvas) is an example of a window that adds
|
::wxScrolledWindow (formerly wxCanvas) is an example of a window that adds
|
||||||
functionality to make scrolling really work. It assumes that scrolling happens
|
functionality to make scrolling really work. It assumes that scrolling happens
|
||||||
in consistent units, not different-sized jumps, and that page size is
|
in consistent units, not different-sized jumps, and that page size is
|
||||||
represented by the visible portion of the window. It is suited to drawing
|
represented by the visible portion of the window. It is suited to drawing
|
||||||
|
@@ -49,40 +49,40 @@
|
|||||||
// some symbolic names for TZ
|
// some symbolic names for TZ
|
||||||
|
|
||||||
// Europe
|
// Europe
|
||||||
WET = GMT0, // Western Europe Time
|
WET = GMT0, // Western Europe Time
|
||||||
WEST = GMT1, // Western Europe Summer Time
|
WEST = GMT1, // Western Europe Summer Time
|
||||||
CET = GMT1, // Central Europe Time
|
CET = GMT1, // Central Europe Time
|
||||||
CEST = GMT2, // Central Europe Summer Time
|
CEST = GMT2, // Central Europe Summer Time
|
||||||
EET = GMT2, // Eastern Europe Time
|
EET = GMT2, // Eastern Europe Time
|
||||||
EEST = GMT3, // Eastern Europe Summer Time
|
EEST = GMT3, // Eastern Europe Summer Time
|
||||||
MSK = GMT3, // Moscow Time
|
MSK = GMT3, // Moscow Time
|
||||||
MSD = GMT4, // Moscow Summer Time
|
MSD = GMT4, // Moscow Summer Time
|
||||||
|
|
||||||
// US and Canada
|
// US and Canada
|
||||||
AST = GMT_4, // Atlantic Standard Time
|
AST = GMT_4, // Atlantic Standard Time
|
||||||
ADT = GMT_3, // Atlantic Daylight Time
|
ADT = GMT_3, // Atlantic Daylight Time
|
||||||
EST = GMT_5, // Eastern Standard Time
|
EST = GMT_5, // Eastern Standard Time
|
||||||
EDT = GMT_4, // Eastern Daylight Saving Time
|
EDT = GMT_4, // Eastern Daylight Saving Time
|
||||||
CST = GMT_6, // Central Standard Time
|
CST = GMT_6, // Central Standard Time
|
||||||
CDT = GMT_5, // Central Daylight Saving Time
|
CDT = GMT_5, // Central Daylight Saving Time
|
||||||
MST = GMT_7, // Mountain Standard Time
|
MST = GMT_7, // Mountain Standard Time
|
||||||
MDT = GMT_6, // Mountain Daylight Saving Time
|
MDT = GMT_6, // Mountain Daylight Saving Time
|
||||||
PST = GMT_8, // Pacific Standard Time
|
PST = GMT_8, // Pacific Standard Time
|
||||||
PDT = GMT_7, // Pacific Daylight Saving Time
|
PDT = GMT_7, // Pacific Daylight Saving Time
|
||||||
HST = GMT_10, // Hawaiian Standard Time
|
HST = GMT_10, // Hawaiian Standard Time
|
||||||
AKST = GMT_9, // Alaska Standard Time
|
AKST = GMT_9, // Alaska Standard Time
|
||||||
AKDT = GMT_8, // Alaska Daylight Saving Time
|
AKDT = GMT_8, // Alaska Daylight Saving Time
|
||||||
|
|
||||||
// Australia
|
// Australia
|
||||||
|
|
||||||
A_WST = GMT8, // Western Standard Time
|
A_WST = GMT8, // Western Standard Time
|
||||||
A_CST = GMT13 + 1, // Central Standard Time (+9.5)
|
A_CST = GMT13 + 1, // Central Standard Time (+9.5)
|
||||||
A_EST = GMT10, // Eastern Standard Time
|
A_EST = GMT10, // Eastern Standard Time
|
||||||
A_ESST = GMT11, // Eastern Summer Time
|
A_ESST = GMT11, // Eastern Summer Time
|
||||||
|
|
||||||
// New Zealand
|
// New Zealand
|
||||||
NZST = GMT12, // Standard Time
|
NZST = GMT12, // Standard Time
|
||||||
NZDT = GMT13, // Daylight Saving Time
|
NZDT = GMT13, // Daylight Saving Time
|
||||||
|
|
||||||
// Universal Coordinated Time = the new and politically correct name
|
// Universal Coordinated Time = the new and politically correct name
|
||||||
// for GMT
|
// for GMT
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: datstrm.h
|
// Name: datstrm.h
|
||||||
// Purpose: interface of wxDataOutputStream
|
// Purpose: interface of wxDataInputStream and wxDataOutputStream
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -10,44 +10,48 @@
|
|||||||
@class wxDataOutputStream
|
@class wxDataOutputStream
|
||||||
@wxheader{datstrm.h}
|
@wxheader{datstrm.h}
|
||||||
|
|
||||||
This class provides functions that write binary data types in a
|
This class provides functions that write binary data types in a portable
|
||||||
portable way. Data can be written in either big-endian or little-endian
|
way. Data can be written in either big-endian or little-endian format,
|
||||||
format, little-endian being the default on all architectures.
|
little-endian being the default on all architectures.
|
||||||
|
|
||||||
If you want to write data to text files (or streams) use
|
If you want to write data to text files (or streams) use wxTextOutputStream
|
||||||
wxTextOutputStream instead.
|
instead.
|
||||||
|
|
||||||
The operator is overloaded and you can use this class like a standard
|
The "<<" operator is overloaded and you can use this class like a standard
|
||||||
C++ iostream. See wxDataInputStream for its
|
C++ iostream. See wxDataInputStream for its usage and caveats.
|
||||||
usage and caveats.
|
|
||||||
|
|
||||||
See also wxDataInputStream.
|
|
||||||
|
|
||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{streams}
|
@category{streams}
|
||||||
|
|
||||||
|
@see wxDataInputStream
|
||||||
*/
|
*/
|
||||||
class wxDataOutputStream
|
class wxDataOutputStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
)
|
Constructs a datastream object from an output stream. Only write
|
||||||
Constructs a datastream object from an output stream. Only write methods will
|
methods will be available.
|
||||||
be available. The second form is only available in Unicode build of wxWidgets.
|
|
||||||
|
@param stream
|
||||||
|
The output stream.
|
||||||
|
*/
|
||||||
|
wxDataOutputStream(wxOutputStream& stream);
|
||||||
|
/**
|
||||||
|
Constructs a datastream object from an output stream. Only write
|
||||||
|
methods will be available. This constructor is only available in
|
||||||
|
Unicode builds of wxWidgets.
|
||||||
|
|
||||||
@param stream
|
@param stream
|
||||||
The output stream.
|
The output stream.
|
||||||
@param conv
|
@param conv
|
||||||
Charset conversion object object used to encoding Unicode
|
Charset conversion object object used to encoding Unicode strings
|
||||||
strings before writing them to the stream
|
before writing them to the stream in Unicode mode (see
|
||||||
in Unicode mode (see WriteString()
|
WriteString() for a detailed description). Note that you must not
|
||||||
documentation for detailed description). Note that you must not destroy
|
destroy @a conv before you destroy this wxDataOutputStream
|
||||||
conv before you destroy this wxDataOutputStream instance! It is
|
instance! It is recommended to use the default value (UTF-8).
|
||||||
recommended to use default value (UTF-8).
|
|
||||||
*/
|
*/
|
||||||
wxDataOutputStream(wxOutputStream& stream);
|
wxDataOutputStream(wxOutputStream& stream,
|
||||||
wxDataOutputStream(wxOutputStream& stream);
|
const wxMBConv& conv = wxConvAuto());
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys the wxDataOutputStream object.
|
Destroys the wxDataOutputStream object.
|
||||||
@@ -55,67 +59,74 @@ public:
|
|||||||
~wxDataOutputStream();
|
~wxDataOutputStream();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
If @a be_order is @true, all data will be written in big-endian
|
If @a be_order is @true, all data will be written in big-endian order,
|
||||||
order, e.g. for reading on a Sparc or from Java-Streams (which
|
e.g. for reading on a Sparc or from Java-Streams (which always use
|
||||||
always use big-endian order), otherwise data will be written in
|
big-endian order), otherwise data will be written in little-endian
|
||||||
little-endian order.
|
order.
|
||||||
*/
|
*/
|
||||||
void BigEndianOrdered(bool be_order);
|
void BigEndianOrdered(bool be_order);
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Writes an array of 16 bit unsigned integer to the stream. The amount of
|
Writes the single byte @a i8 to the stream.
|
||||||
16 bit unsigned integer to write is specified with the @a size variable.
|
|
||||||
*/
|
*/
|
||||||
void Write16(wxUint16 i16);
|
void Write8(wxUint8 i8);
|
||||||
void Write16(const wxUint16* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
|
||||||
Writes an array of 32 bit unsigned integer to the stream. The amount of
|
|
||||||
32 bit unsigned integer to write is specified with the @a size variable.
|
|
||||||
*/
|
|
||||||
void Write32(wxUint32 i32);
|
|
||||||
void Write32(const wxUint32* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
|
||||||
Writes an array of 64 bit unsigned integer to the stream. The amount of
|
|
||||||
64 bit unsigned integer to write is specified with the @a size variable.
|
|
||||||
*/
|
|
||||||
void Write64(wxUint64 i64);
|
|
||||||
void Write64(const wxUint64* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Writes an array of bytes to the stream. The amount of bytes to write is
|
Writes an array of bytes to the stream. The amount of bytes to write is
|
||||||
specified with the @a size variable.
|
specified with the @a size variable.
|
||||||
*/
|
*/
|
||||||
void Write8(wxUint8 i8);
|
|
||||||
void Write8(const wxUint8* buffer, size_t size);
|
void Write8(const wxUint8* buffer, size_t size);
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
/**
|
||||||
|
Writes the 16 bit unsigned integer @a i16 to the stream.
|
||||||
|
*/
|
||||||
|
void Write16(wxUint16 i16);
|
||||||
|
/**
|
||||||
|
Writes an array of 16 bit unsigned integer to the stream. The amount of
|
||||||
|
16 bit unsigned integer to write is specified with the @a size variable.
|
||||||
|
*/
|
||||||
|
void Write16(const wxUint16* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Writes the 32 bit unsigned integer @a i32 to the stream.
|
||||||
|
*/
|
||||||
|
void Write32(wxUint32 i32);
|
||||||
|
/**
|
||||||
|
Writes an array of 32 bit unsigned integer to the stream. The amount of
|
||||||
|
32 bit unsigned integer to write is specified with the @a size variable.
|
||||||
|
*/
|
||||||
|
void Write32(const wxUint32* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Writes the 64 bit unsigned integer @a i64 to the stream.
|
||||||
|
*/
|
||||||
|
void Write64(wxUint64 i64);
|
||||||
|
/**
|
||||||
|
Writes an array of 64 bit unsigned integer to the stream. The amount of
|
||||||
|
64 bit unsigned integer to write is specified with the @a size variable.
|
||||||
|
*/
|
||||||
|
void Write64(const wxUint64* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Writes the double @a f to the stream using the IEEE format.
|
||||||
|
*/
|
||||||
|
void WriteDouble(double f);
|
||||||
/**
|
/**
|
||||||
Writes an array of double to the stream. The amount of double to write is
|
Writes an array of double to the stream. The amount of double to write is
|
||||||
specified with the @a size variable.
|
specified with the @a size variable.
|
||||||
*/
|
*/
|
||||||
void WriteDouble(double f);
|
|
||||||
void WriteDouble(const double* buffer, size_t size);
|
void WriteDouble(const double* buffer, size_t size);
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Writes @a string to the stream. Actually, this method writes the size of
|
Writes @a string to the stream. Actually, this method writes the size
|
||||||
the string before writing @a string itself.
|
of the string before writing @a string itself.
|
||||||
In ANSI build of wxWidgets, the string is written to the stream in exactly
|
|
||||||
same way it is represented in memory. In Unicode build, however, the string
|
In ANSI build of wxWidgets, the string is written to the stream in
|
||||||
is first converted to multibyte representation with @e conv object passed
|
exactly same way it is represented in memory. In Unicode build,
|
||||||
to stream's constructor (consequently, ANSI application can read data
|
however, the string is first converted to multibyte representation with
|
||||||
written by Unicode application, as long as they agree on encoding) and this
|
@e conv object passed to stream's constructor (consequently, ANSI
|
||||||
representation is written to the stream. UTF-8 is used by default.
|
applications can read data written by Unicode application, as long as
|
||||||
|
they agree on encoding) and this representation is written to the
|
||||||
|
stream. UTF-8 is used by default.
|
||||||
*/
|
*/
|
||||||
void WriteString(const wxString& string);
|
void WriteString(const wxString& string);
|
||||||
};
|
};
|
||||||
@@ -126,61 +137,65 @@ public:
|
|||||||
@class wxDataInputStream
|
@class wxDataInputStream
|
||||||
@wxheader{datstrm.h}
|
@wxheader{datstrm.h}
|
||||||
|
|
||||||
This class provides functions that read binary data types in a
|
This class provides functions that read binary data types in a portable
|
||||||
portable way. Data can be read in either big-endian or little-endian
|
way. Data can be read in either big-endian or little-endian format,
|
||||||
format, little-endian being the default on all architectures.
|
little-endian being the default on all architectures.
|
||||||
|
|
||||||
If you want to read data from text files (or streams) use
|
If you want to read data from text files (or streams) use wxTextInputStream
|
||||||
wxTextInputStream instead.
|
instead.
|
||||||
|
|
||||||
The operator is overloaded and you can use this class like a standard C++
|
The ">>" operator is overloaded and you can use this class like a standard
|
||||||
iostream.
|
C++ iostream. Note, however, that the arguments are the fixed size types
|
||||||
Note, however, that the arguments are the fixed size types wxUint32, wxInt32 etc
|
wxUint32, wxInt32 etc and on a typical 32-bit computer, none of these match
|
||||||
and on a typical 32-bit computer, none of these match to the "long" type
|
to the "long" type (wxInt32 is defined as signed int on 32-bit
|
||||||
(wxInt32
|
architectures) so that you cannot use long. To avoid problems (here and
|
||||||
is defined as signed int on 32-bit architectures) so that you cannot use long.
|
elsewhere), make use of the wxInt32, wxUint32, etc types.
|
||||||
To avoid
|
|
||||||
problems (here and elsewhere), make use of the wxInt32, wxUint32, etc types.
|
|
||||||
|
|
||||||
For example:
|
For example:
|
||||||
|
|
||||||
@code
|
@code
|
||||||
wxFileInputStream input( "mytext.dat" );
|
wxFileInputStream input( "mytext.dat" );
|
||||||
wxDataInputStream store( input );
|
wxDataInputStream store( input );
|
||||||
wxUint8 i1;
|
wxUint8 i1;
|
||||||
float f2;
|
float f2;
|
||||||
wxString line;
|
wxString line;
|
||||||
|
|
||||||
store i1; // read a 8 bit integer.
|
store >> i1; // read a 8 bit integer.
|
||||||
store i1 f2; // read a 8 bit integer followed by float.
|
store >> i1 >> f2; // read a 8 bit integer followed by float.
|
||||||
store line; // read a text line
|
store >> line; // read a text line
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
See also wxDataOutputStream.
|
|
||||||
|
|
||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{streams}
|
@category{streams}
|
||||||
|
|
||||||
|
@see wxDataOutputStream
|
||||||
*/
|
*/
|
||||||
class wxDataInputStream
|
class wxDataInputStream
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
)
|
Constructs a datastream object from an input stream. Only read methods
|
||||||
Constructs a datastream object from an input stream. Only read methods will
|
will be available.
|
||||||
be available. The second form is only available in Unicode build of wxWidgets.
|
|
||||||
|
@param stream
|
||||||
|
The input stream.
|
||||||
|
*/
|
||||||
|
wxDataInputStream(wxInputStream& stream);
|
||||||
|
/**
|
||||||
|
Constructs a datastream object from an input stream. Only read methods
|
||||||
|
will be available. This constructor is only available in Unicode builds
|
||||||
|
of wxWidgets.
|
||||||
|
|
||||||
@param stream
|
@param stream
|
||||||
The input stream.
|
The input stream.
|
||||||
@param conv
|
@param conv
|
||||||
Charset conversion object object used to decode strings in Unicode
|
Charset conversion object object used to decode strings in Unicode
|
||||||
mode (see ReadString()
|
mode (see ReadString() for a detailed description). Note that you
|
||||||
documentation for detailed description). Note that you must not destroy
|
must not destroy @a conv before you destroy this wxDataInputStream
|
||||||
conv before you destroy this wxDataInputStream instance!
|
instance!
|
||||||
*/
|
*/
|
||||||
wxDataInputStream(wxInputStream& stream);
|
wxDataInputStream(wxInputStream& stream,
|
||||||
wxDataInputStream(wxInputStream& stream);
|
const wxMBConv& conv = wxConvAuto());
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Destroys the wxDataInputStream object.
|
Destroys the wxDataInputStream object.
|
||||||
@@ -188,70 +203,77 @@ public:
|
|||||||
~wxDataInputStream();
|
~wxDataInputStream();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
If @a be_order is @true, all data will be read in big-endian
|
If @a be_order is @true, all data will be read in big-endian order,
|
||||||
order, such as written by programs on a big endian architecture
|
such as written by programs on a big endian architecture (e.g. Sparc)
|
||||||
(e.g. Sparc) or written by Java-Streams (which always use
|
or written by Java-Streams (which always use big-endian order).
|
||||||
big-endian order).
|
|
||||||
*/
|
*/
|
||||||
void BigEndianOrdered(bool be_order);
|
void BigEndianOrdered(bool be_order);
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Reads 16 bit unsigned integers from the stream in a specified buffer. the
|
Reads a single byte from the stream.
|
||||||
amount of 16 bit unsigned integer to read is specified by the @a size variable.
|
|
||||||
*/
|
|
||||||
wxUint16 Read16();
|
|
||||||
void Read16(wxUint16* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
|
||||||
Reads 32 bit unsigned integers from the stream in a specified buffer. the
|
|
||||||
amount of
|
|
||||||
32 bit unsigned integer to read is specified by the @a size variable.
|
|
||||||
*/
|
|
||||||
wxUint32 Read32();
|
|
||||||
void Read32(wxUint32* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
|
||||||
Reads 64 bit unsigned integers from the stream in a specified buffer. the
|
|
||||||
amount of
|
|
||||||
64 bit unsigned integer to read is specified by the @a size variable.
|
|
||||||
*/
|
|
||||||
wxUint64 Read64();
|
|
||||||
void Read64(wxUint64* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
|
||||||
Reads bytes from the stream in a specified buffer. The amount of
|
|
||||||
bytes to read is specified by the @a size variable.
|
|
||||||
*/
|
*/
|
||||||
wxUint8 Read8();
|
wxUint8 Read8();
|
||||||
void Read8(wxUint8* buffer, size_t size);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Reads double data (IEEE encoded) from the stream in a specified buffer. the
|
Reads bytes from the stream in a specified buffer. The amount of bytes
|
||||||
amount of
|
to read is specified by the @a size variable.
|
||||||
double to read is specified by the @a size variable.
|
*/
|
||||||
|
void Read8(wxUint8* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads a 16 bit unsigned integer from the stream.
|
||||||
|
*/
|
||||||
|
wxUint16 Read16();
|
||||||
|
/**
|
||||||
|
Reads 16 bit unsigned integers from the stream in a specified buffer.
|
||||||
|
The amount of 16 bit unsigned integers to read is specified by the
|
||||||
|
@a size variable.
|
||||||
|
*/
|
||||||
|
void Read16(wxUint16* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads a 32 bit unsigned integer from the stream.
|
||||||
|
*/
|
||||||
|
wxUint32 Read32();
|
||||||
|
/**
|
||||||
|
Reads 32 bit unsigned integers from the stream in a specified buffer.
|
||||||
|
The amount of 32 bit unsigned integers to read is specified by the
|
||||||
|
@a size variable.
|
||||||
|
*/
|
||||||
|
void Read32(wxUint32* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads a 64 bit unsigned integer from the stream.
|
||||||
|
*/
|
||||||
|
wxUint64 Read64();
|
||||||
|
/**
|
||||||
|
Reads 64 bit unsigned integers from the stream in a specified buffer.
|
||||||
|
The amount of 64 bit unsigned integers to read is specified by the
|
||||||
|
@a size variable.
|
||||||
|
*/
|
||||||
|
void Read64(wxUint64* buffer, size_t size);
|
||||||
|
|
||||||
|
/**
|
||||||
|
Reads a double (IEEE encoded) from the stream.
|
||||||
*/
|
*/
|
||||||
double ReadDouble();
|
double ReadDouble();
|
||||||
|
/**
|
||||||
|
Reads double data (IEEE encoded) from the stream in a specified buffer.
|
||||||
|
The amount of doubles to read is specified by the @a size variable.
|
||||||
|
*/
|
||||||
void ReadDouble(double* buffer, size_t size);
|
void ReadDouble(double* buffer, size_t size);
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Reads a string from a stream. Actually, this function first reads a long
|
Reads a string from a stream. Actually, this function first reads a
|
||||||
integer specifying the length of the string (without the last null character)
|
long integer specifying the length of the string (without the last null
|
||||||
and then reads the string.
|
character) and then reads the string.
|
||||||
In Unicode build of wxWidgets, the fuction first reads multibyte (char*)
|
|
||||||
string from the stream and then converts it to Unicode using the @e conv
|
In Unicode build of wxWidgets, the fuction first reads multibyte
|
||||||
object passed to constructor and returns the result as wxString. You are
|
(char*) string from the stream and then converts it to Unicode using
|
||||||
responsible for using the same convertor as when writing the stream.
|
the @e conv object passed to constructor and returns the result as
|
||||||
See also wxDataOutputStream::WriteString.
|
wxString. You are responsible for using the same convertor as when
|
||||||
|
writing the stream.
|
||||||
|
|
||||||
|
@see wxDataOutputStream::WriteString()
|
||||||
*/
|
*/
|
||||||
wxString ReadString();
|
wxString ReadString();
|
||||||
};
|
};
|
||||||
|
1009
interface/dc.h
1009
interface/dc.h
File diff suppressed because it is too large
Load Diff
@@ -11,29 +11,29 @@
|
|||||||
@wxheader{dcbuffer.h}
|
@wxheader{dcbuffer.h}
|
||||||
|
|
||||||
This class provides a simple way to avoid flicker: when drawing on it,
|
This class provides a simple way to avoid flicker: when drawing on it,
|
||||||
everything is in fact first drawn on an in-memory buffer (a
|
everything is in fact first drawn on an in-memory buffer (a wxBitmap) and
|
||||||
wxBitmap) and then copied to the screen, using the
|
then copied to the screen, using the associated wxDC, only once, when this
|
||||||
associated wxDC, only once, when this object is destroyed. wxBufferedDC itself
|
object is destroyed. wxBufferedDC itself is typically associated with
|
||||||
is typically associated with wxClientDC, if you want to
|
wxClientDC, if you want to use it in your @c EVT_PAINT handler, you should
|
||||||
use it in your @c EVT_PAINT handler, you should look at
|
look at wxBufferedPaintDC instead.
|
||||||
wxBufferedPaintDC instead.
|
|
||||||
|
|
||||||
When used like this, a valid @e dc must be specified in the constructor
|
When used like this, a valid @e DC must be specified in the constructor
|
||||||
while the @e buffer bitmap doesn't have to be explicitly provided, by
|
while the @e buffer bitmap doesn't have to be explicitly provided, by
|
||||||
default this class will allocate the bitmap of required size itself. However
|
default this class will allocate the bitmap of required size itself.
|
||||||
using a dedicated bitmap can speed up the redrawing process by eliminating the
|
However using a dedicated bitmap can speed up the redrawing process by
|
||||||
repeated creation and destruction of a possibly big bitmap. Otherwise,
|
eliminating the repeated creation and destruction of a possibly big bitmap.
|
||||||
wxBufferedDC can be used in the same way as any other device context.
|
Otherwise, wxBufferedDC can be used in the same way as any other device
|
||||||
|
context.
|
||||||
|
|
||||||
There is another possible use for wxBufferedDC is to use it to maintain a
|
There is another possible use for wxBufferedDC is to use it to maintain a
|
||||||
backing store for the window contents. In this case, the associated @e dc
|
backing store for the window contents. In this case, the associated @e DC
|
||||||
may be @NULL but a valid backing store bitmap should be specified.
|
may be @NULL but a valid backing store bitmap should be specified.
|
||||||
|
|
||||||
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
|
Finally, please note that GTK+ 2.0 as well as OS X provide double buffering
|
||||||
themselves natively. You can either use wxWindow::IsDoubleBuffered
|
themselves natively. You can either use wxWindow::IsDoubleBuffered() to
|
||||||
to determine whether you need to use buffering or not, or use
|
determine whether you need to use buffering or not, or use
|
||||||
wxAutoBufferedPaintDC to avoid needless double
|
wxAutoBufferedPaintDC to avoid needless double buffering on the systems
|
||||||
buffering on the systems which already do it automatically.
|
which already do it automatically.
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{dc}
|
@category{dc}
|
||||||
@@ -43,36 +43,35 @@
|
|||||||
class wxBufferedDC : public wxMemoryDC
|
class wxBufferedDC : public wxMemoryDC
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
/**
|
||||||
|
Default constructor. You must call one of the Init() methods later in
|
||||||
|
order to use the device context.
|
||||||
|
*/
|
||||||
|
wxBufferedDC();
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
If you use the first, default, constructor, you must call one of the
|
Creates a buffer for the provided @dc. Init() must not be called when
|
||||||
Init() methods later in order to use the object.
|
using this constructor.
|
||||||
The other constructors initialize the object immediately and @c Init()
|
|
||||||
must not be called after using them.
|
|
||||||
|
|
||||||
@param dc
|
@param dc
|
||||||
The underlying DC: everything drawn to this object will be
|
The underlying DC: everything drawn to this object will be flushed
|
||||||
flushed to this DC when this object is destroyed. You may pass @NULL
|
to this DC when this object is destroyed. You may pass @NULL in
|
||||||
in order to just initialize the buffer, and not flush it.
|
order to just initialize the buffer, and not flush it.
|
||||||
@param area
|
@param area
|
||||||
The size of the bitmap to be used for buffering (this bitmap is
|
The size of the bitmap to be used for buffering (this bitmap is
|
||||||
created internally when it is not given explicitly).
|
created internally when it is not given explicitly).
|
||||||
@param buffer
|
@param buffer
|
||||||
Explicitly provided bitmap to be used for buffering: this is
|
Explicitly provided bitmap to be used for buffering: this is the
|
||||||
the most efficient solution as the bitmap doesn't have to be recreated each
|
most efficient solution as the bitmap doesn't have to be recreated
|
||||||
time but it also requires more memory as the bitmap is never freed. The
|
each time but it also requires more memory as the bitmap is never
|
||||||
bitmap
|
freed. The bitmap should have appropriate size, anything drawn
|
||||||
should have appropriate size, anything drawn outside of its bounds is
|
outside of its bounds is clipped.
|
||||||
clipped.
|
|
||||||
@param style
|
@param style
|
||||||
wxBUFFER_CLIENT_AREA to indicate that just the client area of
|
wxBUFFER_CLIENT_AREA to indicate that just the client area of the
|
||||||
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the
|
window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the
|
||||||
buffer bitmap
|
buffer bitmap covers the virtual area.
|
||||||
covers the virtual area (in which case PrepareDC is automatically called
|
|
||||||
for the actual window
|
|
||||||
device context).
|
|
||||||
*/
|
*/
|
||||||
wxBufferedDC();
|
|
||||||
wxBufferedDC(wxDC* dc, const wxSize& area,
|
wxBufferedDC(wxDC* dc, const wxSize& area,
|
||||||
int style = wxBUFFER_CLIENT_AREA);
|
int style = wxBUFFER_CLIENT_AREA);
|
||||||
wxBufferedDC(wxDC* dc, wxBitmap& buffer,
|
wxBufferedDC(wxDC* dc, wxBitmap& buffer,
|
||||||
@@ -80,15 +79,15 @@ public:
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Copies everything drawn on the DC so far to the underlying DC associated with
|
Copies everything drawn on the DC so far to the underlying DC
|
||||||
this object, if any.
|
associated with this object, if any.
|
||||||
*/
|
*/
|
||||||
|
~wxBufferedDC();
|
||||||
|
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
These functions initialize the object created using the default constructor.
|
Initializes the object created using the default constructor. Please
|
||||||
Please see @ref ctor() "constructors documentation" for details.
|
see the constructors for parameter details.
|
||||||
*/
|
*/
|
||||||
void Init(wxDC* dc, const wxSize& area,
|
void Init(wxDC* dc, const wxSize& area,
|
||||||
int style = wxBUFFER_CLIENT_AREA);
|
int style = wxBUFFER_CLIENT_AREA);
|
||||||
@@ -103,24 +102,24 @@ public:
|
|||||||
@class wxAutoBufferedPaintDC
|
@class wxAutoBufferedPaintDC
|
||||||
@wxheader{dcbuffer.h}
|
@wxheader{dcbuffer.h}
|
||||||
|
|
||||||
This wxDC derivative can be used inside of an @c OnPaint() event handler to
|
This wxDC derivative can be used inside of an @c EVT_PAINT() event handler
|
||||||
achieve
|
to achieve double-buffered drawing. Just use this class instead of
|
||||||
double-buffered drawing. Just create an object of this class instead of
|
wxPaintDC and make sure wxWindow::SetBackgroundStyle() is called with
|
||||||
wxPaintDC
|
wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's
|
||||||
and make sure wxWindow::SetBackgroundStyle is called
|
all you have to do to (mostly) avoid flicker.
|
||||||
with wxBG_STYLE_CUSTOM somewhere in the class initialization code, and that's
|
|
||||||
all you have
|
|
||||||
to do to (mostly) avoid flicker.
|
|
||||||
|
|
||||||
The difference between wxBufferedPaintDC and this class,
|
The difference between wxBufferedPaintDC and this class is that this class
|
||||||
is the lightweigthness - on platforms which have native double-buffering,
|
won't double-buffer on platforms which have native double-buffering
|
||||||
wxAutoBufferedPaintDC is simply
|
already, avoiding any unneccessary buffering to avoid flicker.
|
||||||
a typedef of wxPaintDC. Otherwise, it is a typedef of wxBufferedPaintDC.
|
|
||||||
|
wxAutoBufferedPaintDC is simply a typedef of wxPaintDC on platforms that
|
||||||
|
have native double-buffering, otherwise, it is a typedef of
|
||||||
|
wxBufferedPaintDC.
|
||||||
|
|
||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{dc}
|
@category{dc}
|
||||||
|
|
||||||
@see wxDC, wxBufferedPaintDC
|
@see wxDC, wxBufferedPaintDC, wxPaintDC
|
||||||
*/
|
*/
|
||||||
class wxAutoBufferedPaintDC : public wxBufferedPaintDC
|
class wxAutoBufferedPaintDC : public wxBufferedPaintDC
|
||||||
{
|
{
|
||||||
@@ -137,38 +136,34 @@ public:
|
|||||||
@class wxBufferedPaintDC
|
@class wxBufferedPaintDC
|
||||||
@wxheader{dcbuffer.h}
|
@wxheader{dcbuffer.h}
|
||||||
|
|
||||||
This is a subclass of wxBufferedDC which can be used
|
This is a subclass of wxBufferedDC which can be used inside of an
|
||||||
inside of an @c OnPaint() event handler. Just create an object of this class
|
@c EVT_PAINT() event handler to achieve double-buffered drawing. Just use
|
||||||
instead
|
this class instead of wxPaintDC and make sure
|
||||||
of wxPaintDC and make sure wxWindow::SetBackgroundStyle
|
wxWindow::SetBackgroundStyle() is called with wxBG_STYLE_CUSTOM somewhere
|
||||||
is called with wxBG_STYLE_CUSTOM somewhere in the class initialization code,
|
in the class initialization code, and that's all you have to do to (mostly)
|
||||||
and that's all
|
avoid flicker. The only thing to watch out for is that if you are using
|
||||||
you have to do to (mostly) avoid flicker. The only thing to watch out for is
|
this class together with wxScrolled, you probably do @b not want to call
|
||||||
that if you are
|
wxScrolled::PrepareDC() on it as it already does this internally for the
|
||||||
using this class together with wxScrolledWindow, you probably
|
real underlying wxPaintDC.
|
||||||
do @b not want to call wxScrolledWindow::PrepareDC on it as it
|
|
||||||
already does this internally for the real underlying wxPaintDC.
|
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{dc}
|
@category{dc}
|
||||||
|
|
||||||
@see wxDC, wxBufferedDC, wxAutoBufferedPaintDC
|
@see wxDC, wxBufferedDC, wxAutoBufferedPaintDC, wxPaintDC
|
||||||
*/
|
*/
|
||||||
class wxBufferedPaintDC : public wxBufferedDC
|
class wxBufferedPaintDC : public wxBufferedDC
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
As with @ref wxBufferedDC::ctor wxBufferedDC, you may either provide the
|
As with wxBufferedDC, you may either provide the bitmap to be used for
|
||||||
bitmap to be used for buffering or let this object create one internally (in
|
buffering or let this object create one internally (in the latter case,
|
||||||
the latter case, the size of the client part of the window is used).
|
the size of the client part of the window is used).
|
||||||
Pass wxBUFFER_CLIENT_AREA for the @a style parameter to indicate that just the
|
|
||||||
client area of
|
Pass wxBUFFER_CLIENT_AREA for the @a style parameter to indicate that
|
||||||
the window is buffered, or wxBUFFER_VIRTUAL_AREA to indicate that the buffer
|
just the client area of the window is buffered, or
|
||||||
bitmap
|
wxBUFFER_VIRTUAL_AREA to indicate that the buffer bitmap covers the
|
||||||
covers the virtual area (in which case PrepareDC is automatically called for
|
virtual area.
|
||||||
the actual window
|
|
||||||
device context).
|
|
||||||
*/
|
*/
|
||||||
wxBufferedPaintDC(wxWindow* window, wxBitmap& buffer,
|
wxBufferedPaintDC(wxWindow* window, wxBitmap& buffer,
|
||||||
int style = wxBUFFER_CLIENT_AREA);
|
int style = wxBUFFER_CLIENT_AREA);
|
||||||
@@ -177,8 +172,9 @@ public:
|
|||||||
//@}
|
//@}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Copies everything drawn on the DC so far to the window associated with this
|
Copies everything drawn on the DC so far to the window associated with
|
||||||
object, using a wxPaintDC.
|
this object, using a wxPaintDC.
|
||||||
*/
|
*/
|
||||||
|
~wxBufferedPaintDC();
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@@ -43,7 +43,7 @@ class wxHtmlWindow : public wxScrolledWindow
|
|||||||
public:
|
public:
|
||||||
//@{
|
//@{
|
||||||
/**
|
/**
|
||||||
Constructor. The parameters are the same as for the wxScrolledWindow
|
Constructor. The parameters are the same as wxScrolled::wxScrolled()
|
||||||
constructor.
|
constructor.
|
||||||
|
|
||||||
@param style
|
@param style
|
||||||
@@ -289,7 +289,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Selects the line of text that @a pos points at. Note that @e pos
|
Selects the line of text that @a pos points at. Note that @e pos
|
||||||
is relative to the top of displayed page, not to window's origin, use
|
is relative to the top of displayed page, not to window's origin, use
|
||||||
wxScrolledWindow::CalcUnscrolledPosition
|
wxScrolled::CalcUnscrolledPosition()
|
||||||
to convert physical coordinate.
|
to convert physical coordinate.
|
||||||
|
|
||||||
@see SelectAll(), SelectWord()
|
@see SelectAll(), SelectWord()
|
||||||
@@ -299,7 +299,7 @@ public:
|
|||||||
/**
|
/**
|
||||||
Selects the word at position @e pos. Note that @e pos
|
Selects the word at position @e pos. Note that @e pos
|
||||||
is relative to the top of displayed page, not to window's origin, use
|
is relative to the top of displayed page, not to window's origin, use
|
||||||
wxScrolledWindow::CalcUnscrolledPosition
|
wxScrolled::CalcUnscrolledPosition()
|
||||||
to convert physical coordinate.
|
to convert physical coordinate.
|
||||||
|
|
||||||
@see SelectAll(), SelectLine()
|
@see SelectAll(), SelectLine()
|
||||||
|
@@ -24,10 +24,9 @@
|
|||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{ctrl}
|
@category{ctrl}
|
||||||
@appearance{scrollbar.png}
|
<!-- @appearance{scrollbar.png} -->
|
||||||
|
|
||||||
@see @ref overview_scrollingoverview "Scrolling overview", @ref
|
@see @ref overview_scrolling, @ref overview_eventhandling, wxScrolled
|
||||||
overview_eventhandlingoverview, wxScrolledWindow
|
|
||||||
*/
|
*/
|
||||||
class wxScrollBar : public wxControl
|
class wxScrollBar : public wxControl
|
||||||
{
|
{
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: scrolwin.h
|
// Name: scrolwin.h
|
||||||
// Purpose: interface of wxScrolledWindow
|
// Purpose: interface of wxScrolled template
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -9,7 +9,7 @@
|
|||||||
/**
|
/**
|
||||||
@wxheader{scrolwin.h}
|
@wxheader{scrolwin.h}
|
||||||
|
|
||||||
The wxScrolled<T> class manages scrolling for its client area, transforming
|
The wxScrolled class manages scrolling for its client area, transforming
|
||||||
the coordinates according to the scrollbar positions, and setting the
|
the coordinates according to the scrollbar positions, and setting the
|
||||||
scroll positions, thumb sizes and ranges according to the area in view.
|
scroll positions, thumb sizes and ranges according to the area in view.
|
||||||
|
|
||||||
@@ -26,8 +26,8 @@
|
|||||||
implementating scrollable controls such as tree or list controls.
|
implementating scrollable controls such as tree or list controls.
|
||||||
|
|
||||||
Starting from version 2.4 of wxWidgets, there are several ways to use a
|
Starting from version 2.4 of wxWidgets, there are several ways to use a
|
||||||
wxScrolled<T>. In particular, there are now three ways to set the
|
wxScrolled. In particular, there are now three ways to set the size of the
|
||||||
size of the scrolling area:
|
scrolling area:
|
||||||
|
|
||||||
One way is to set the scrollbars directly using a call to SetScrollbars().
|
One way is to set the scrollbars directly using a call to SetScrollbars().
|
||||||
This is the way it used to be in any previous version of wxWidgets and it
|
This is the way it used to be in any previous version of wxWidgets and it
|
||||||
@@ -42,7 +42,7 @@
|
|||||||
|
|
||||||
The most automatic and newest way is to simply let sizers determine the
|
The most automatic and newest way is to simply let sizers determine the
|
||||||
scrolling area. This is now the default when you set an interior sizer into
|
scrolling area. This is now the default when you set an interior sizer into
|
||||||
a wxScrolled<T> with wxWindow::SetSizer(). The scrolling area will be
|
a wxScrolled with wxWindow::SetSizer(). The scrolling area will be
|
||||||
set to the size requested by the sizer and the scrollbars will be assigned
|
set to the size requested by the sizer and the scrollbars will be assigned
|
||||||
for each orientation according to the need for them and the scrolling
|
for each orientation according to the need for them and the scrolling
|
||||||
increment set by SetScrollRate(). As above, scrolling is only enabled in
|
increment set by SetScrollRate(). As above, scrolling is only enabled in
|
||||||
@@ -59,18 +59,18 @@
|
|||||||
wxWindow::SetVirtualSizeHints() with wxWindow::SetMinVirtualSize() or
|
wxWindow::SetVirtualSizeHints() with wxWindow::SetMinVirtualSize() or
|
||||||
similar and remove it entirely in future.
|
similar and remove it entirely in future.
|
||||||
|
|
||||||
As with all windows, an application can draw onto a wxScrolled<T> using
|
As with all windows, an application can draw onto a wxScrolled using a
|
||||||
a @ref overview_dcoverview "device context".
|
@ref overview_dc "device context".
|
||||||
|
|
||||||
You have the option of handling the OnPaint handler or overriding the
|
You have the option of handling the OnPaint handler or overriding the
|
||||||
wxScrolled<T>::OnDraw() function, which is passed a pre-scrolled device
|
wxScrolled::OnDraw() function, which is passed a pre-scrolled device
|
||||||
context (prepared by wxScrolled<T>::DoPrepareDC()).
|
context (prepared by wxScrolled::DoPrepareDC()).
|
||||||
|
|
||||||
If you don't wish to calculate your own scrolling, you must call
|
If you don't wish to calculate your own scrolling, you must call
|
||||||
DoPrepareDC() when not drawing from within OnDraw(), to set the device
|
DoPrepareDC() when not drawing from within OnDraw(), to set the device
|
||||||
origin for the device context according to the current scroll position.
|
origin for the device context according to the current scroll position.
|
||||||
|
|
||||||
A wxScrolled<T> will normally scroll itself and therefore its child windows
|
A wxScrolled will normally scroll itself and therefore its child windows
|
||||||
as well. It might however be desired to scroll a different window than
|
as well. It might however be desired to scroll a different window than
|
||||||
itself: e.g. when designing a spreadsheet, you will normally only have to
|
itself: e.g. when designing a spreadsheet, you will normally only have to
|
||||||
scroll the (usually white) cell area, whereas the (usually grey) label area
|
scroll the (usually white) cell area, whereas the (usually grey) label area
|
||||||
@@ -92,15 +92,15 @@
|
|||||||
@endStyleTable
|
@endStyleTable
|
||||||
|
|
||||||
@remarks
|
@remarks
|
||||||
Use wxScrolled<T> for applications where the user scrolls by a fixed
|
Use wxScrolled for applications where the user scrolls by a fixed amount,
|
||||||
amount, and where a 'page' can be interpreted to be the current visible
|
and where a 'page' can be interpreted to be the current visible portion of
|
||||||
portion of the window. For more sophisticated applications, use the
|
the window. For more sophisticated applications, use the wxScrolled
|
||||||
wxScrolled<T> implementation as a guide to build your own scroll
|
implementation as a guide to build your own scroll behaviour or use
|
||||||
behaviour or use wxVScrolledWindow or its variants.
|
wxVScrolledWindow or its variants.
|
||||||
|
|
||||||
@since wxScrolled<T> template exists since version 2.9.0. In older
|
@since wxScrolled template exists since version 2.9.0. In older versions,
|
||||||
versions, only ::wxScrolledWindow (equivalent of wxScrolled<wxPanel>)
|
only ::wxScrolledWindow (equivalent of wxScrolled<wxPanel>) was
|
||||||
was available.
|
available.
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{miscwnd}
|
@category{miscwnd}
|
||||||
@@ -129,7 +129,7 @@ public:
|
|||||||
Window size. If a size of @c wxDefaultSize is specified then the
|
Window size. If a size of @c wxDefaultSize is specified then the
|
||||||
window is sized appropriately.
|
window is sized appropriately.
|
||||||
@param style
|
@param style
|
||||||
Window style. See wxScrolled<T>.
|
Window style. See wxScrolled.
|
||||||
@param name
|
@param name
|
||||||
Window name.
|
Window name.
|
||||||
|
|
||||||
@@ -168,7 +168,7 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
Creates the window for two-step construction. Derived classes
|
Creates the window for two-step construction. Derived classes
|
||||||
should call or replace this function. See wxScrolled<T> constructor
|
should call or replace this function. See wxScrolled::wxScrolled()
|
||||||
for details.
|
for details.
|
||||||
*/
|
*/
|
||||||
bool Create(wxWindow* parent, wxWindowID id = -1,
|
bool Create(wxWindow* parent, wxWindowID id = -1,
|
||||||
@@ -347,7 +347,7 @@ public:
|
|||||||
window->SetScrollbars(20, 20, 50, 50);
|
window->SetScrollbars(20, 20, 50, 50);
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
wxScrolled<T> manages the page size itself, using the current client
|
wxScrolled manages the page size itself, using the current client
|
||||||
window size as the page size.
|
window size as the page size.
|
||||||
|
|
||||||
Note that for more sophisticated scrolling applications, for example
|
Note that for more sophisticated scrolling applications, for example
|
||||||
@@ -392,20 +392,20 @@ public:
|
|||||||
/**
|
/**
|
||||||
Scrolled window derived from wxPanel.
|
Scrolled window derived from wxPanel.
|
||||||
|
|
||||||
See wxScrolled<T> for detailed description.
|
See wxScrolled for detailed description.
|
||||||
|
|
||||||
@note Note that because this class derives from wxPanel, it shares its
|
@note Note that because this class derives from wxPanel, it shares its
|
||||||
behavior with regard to TAB traversal and focus handling (in
|
behavior with regard to TAB traversal and focus handling (in
|
||||||
particular, it forwards focus to its children). If you don't want
|
particular, it forwards focus to its children). If you don't want
|
||||||
this behaviour, use ::wxScrolledCanvas instead.
|
this behaviour, use ::wxScrolledCanvas instead.
|
||||||
|
|
||||||
@note wxScrolledWindow is an alias for wxScrolled<wxPanel> since version
|
@note ::wxScrolledWindow is an alias for wxScrolled<wxPanel> since version
|
||||||
2.9.0. In older versions, it was a standalone class.
|
2.9.0. In older versions, it was a standalone class.
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{miscwnd}
|
@category{miscwnd}
|
||||||
|
|
||||||
@see wxScrolled, wxScrolledCanvas
|
@see wxScrolled, ::wxScrolledCanvas
|
||||||
*/
|
*/
|
||||||
typedef wxScrolled<wxPanel> wxScrolledWindow;
|
typedef wxScrolled<wxPanel> wxScrolledWindow;
|
||||||
|
|
||||||
|
@@ -1016,7 +1016,7 @@ public:
|
|||||||
in
|
in
|
||||||
windows which manage it.
|
windows which manage it.
|
||||||
|
|
||||||
@see wxScrolledWindow::SetScrollbars, SetVirtualSizeHints()
|
@see wxScrolled::SetScrollbars(), SetVirtualSizeHints()
|
||||||
*/
|
*/
|
||||||
void FitInside(wxWindow* window);
|
void FitInside(wxWindow* window);
|
||||||
|
|
||||||
@@ -1347,7 +1347,7 @@ public:
|
|||||||
minimal size. For windows with managed scrollbars this will set them
|
minimal size. For windows with managed scrollbars this will set them
|
||||||
appropriately.
|
appropriately.
|
||||||
|
|
||||||
@see wxScrolledWindow::SetScrollbars
|
@see wxScrolled::SetScrollbars()
|
||||||
*/
|
*/
|
||||||
void SetVirtualSizeHints(wxWindow* window);
|
void SetVirtualSizeHints(wxWindow* window);
|
||||||
|
|
||||||
|
@@ -55,7 +55,7 @@
|
|||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{miscwnd}
|
@category{miscwnd}
|
||||||
|
|
||||||
@see @ref overview_wxtoolbaroverview "Toolbar overview", wxScrolledWindow
|
@see @ref overview_toolbar
|
||||||
*/
|
*/
|
||||||
class wxToolBar : public wxControl
|
class wxToolBar : public wxControl
|
||||||
{
|
{
|
||||||
|
@@ -589,11 +589,10 @@ public:
|
|||||||
are shown on the screen need to be measured; or even "vertical", because
|
are shown on the screen need to be measured; or even "vertical", because
|
||||||
this class only supports scrolling vertically.
|
this class only supports scrolling vertically.
|
||||||
|
|
||||||
In any case, this is a generalization of the
|
In any case, this is a generalization of wxScrolled which can be only used
|
||||||
wxScrolledWindow class which can be only used when
|
when all rows have the same heights. It lacks some other wxScrolled
|
||||||
all rows have the same heights. It lacks some other wxScrolledWindow features
|
features however, notably it can't scroll only a rectangle of the window
|
||||||
however, notably it can't scroll only a rectangle of the window and not its
|
and not its entire client area.
|
||||||
entire client area.
|
|
||||||
|
|
||||||
To use this class, you need to derive from it and implement the
|
To use this class, you need to derive from it and implement the
|
||||||
wxVarVScrollHelper::OnGetRowHeight pure virtual
|
wxVarVScrollHelper::OnGetRowHeight pure virtual
|
||||||
@@ -702,11 +701,10 @@ public:
|
|||||||
the widths of all columns in advance -- only those which are shown on the
|
the widths of all columns in advance -- only those which are shown on the
|
||||||
screen need to be measured.
|
screen need to be measured.
|
||||||
|
|
||||||
In any case, this is a generalization of the
|
In any case, this is a generalization of wxScrolled which can be only used
|
||||||
wxScrolledWindow class which can be only used when
|
when all columns have the same widths. It lacks some other wxScrolled
|
||||||
all columns have the same widths. It lacks some other wxScrolledWindow features
|
features however, notably it can't scroll only a rectangle of the window
|
||||||
however, notably it can't scroll only a rectangle of the window and not its
|
and not its entire client area.
|
||||||
entire client area.
|
|
||||||
|
|
||||||
To use this class, you need to derive from it and implement the
|
To use this class, you need to derive from it and implement the
|
||||||
wxVarHScrollHelper::OnGetColumnWidth pure virtual
|
wxVarHScrollHelper::OnGetColumnWidth pure virtual
|
||||||
@@ -782,10 +780,10 @@ public:
|
|||||||
scroll both axis simultaneously with both variable row heights and variable
|
scroll both axis simultaneously with both variable row heights and variable
|
||||||
column widths.
|
column widths.
|
||||||
|
|
||||||
This is a generalization of the wxScrolledWindow
|
In any case, this is a generalization of wxScrolled which can be only used
|
||||||
class which can be only used when all rows and columns are the same size. It
|
when all rows and columns are the same size. It lacks some other wxScrolled
|
||||||
lacks some other wxScrolledWindow features however, notably it can't scroll
|
features however, notably it can't scroll only a rectangle of the window
|
||||||
only a rectangle of the window and not its entire client area.
|
and not its entire client area.
|
||||||
|
|
||||||
To use this class, you must derive from it and implement both the
|
To use this class, you must derive from it and implement both the
|
||||||
wxVarVScrollHelper::OnGetRowHeight and
|
wxVarVScrollHelper::OnGetRowHeight and
|
||||||
|
@@ -1740,8 +1740,8 @@ public:
|
|||||||
on top/bottom and nothing was done.
|
on top/bottom and nothing was done.
|
||||||
|
|
||||||
@remarks This function is currently only implemented under MSW and
|
@remarks This function is currently only implemented under MSW and
|
||||||
wxTextCtrl under wxGTK (it also works for
|
wxTextCtrl under wxGTK (it also works for wxScrolled classes
|
||||||
wxScrolledWindow derived classes under all platforms).
|
under all platforms).
|
||||||
|
|
||||||
@see ScrollPages()
|
@see ScrollPages()
|
||||||
*/
|
*/
|
||||||
@@ -1772,8 +1772,8 @@ public:
|
|||||||
scrolled (this is always the case under wxGTK which doesn't support this
|
scrolled (this is always the case under wxGTK which doesn't support this
|
||||||
parameter)
|
parameter)
|
||||||
|
|
||||||
@remarks Note that you can often use wxScrolledWindow instead of using
|
@remarks Note that you can often use wxScrolled instead of using this
|
||||||
this function directly.
|
function directly.
|
||||||
*/
|
*/
|
||||||
virtual void ScrollWindow(int dx, int dy,
|
virtual void ScrollWindow(int dx, int dy,
|
||||||
const wxRect* rect = NULL);
|
const wxRect* rect = NULL);
|
||||||
@@ -2194,8 +2194,8 @@ public:
|
|||||||
window: it is up to the application to take note of
|
window: it is up to the application to take note of
|
||||||
scrollbar attributes and redraw contents accordingly.
|
scrollbar attributes and redraw contents accordingly.
|
||||||
|
|
||||||
@see SetScrollbar(), GetScrollPos(), GetScrollThumb(),
|
@see SetScrollbar(), GetScrollPos(), GetScrollThumb(), wxScrollBar,
|
||||||
wxScrollBar, wxScrolledWindow
|
wxScrolled
|
||||||
*/
|
*/
|
||||||
virtual void SetScrollPos(int orientation, int pos,
|
virtual void SetScrollPos(int orientation, int pos,
|
||||||
bool refresh = true);
|
bool refresh = true);
|
||||||
@@ -2219,8 +2219,7 @@ public:
|
|||||||
font. The window is sized so that you can only see 16
|
font. The window is sized so that you can only see 16
|
||||||
lines at a time.
|
lines at a time.
|
||||||
|
|
||||||
@see @ref overview_scrollingoverview "Scrolling overview", wxScrollBar,
|
@see @ref overview_scrolling, wxScrollBar, wxScrolled, wxScrollWinEvent
|
||||||
wxScrolledWindow, wxScrollWinEvent
|
|
||||||
*/
|
*/
|
||||||
virtual void SetScrollbar(int orientation, int position,
|
virtual void SetScrollbar(int orientation, int position,
|
||||||
int thumbSize,
|
int thumbSize,
|
||||||
|
Reference in New Issue
Block a user