Finished initial reviews of the rest of the [d*] interface headers.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@53300 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -54,6 +54,8 @@ name. Most classes contained in wxWidgets occur in at least one of the samples.
|
|||||||
@li @ref page_samples_dialogs
|
@li @ref page_samples_dialogs
|
||||||
@li @ref page_samples_dialup
|
@li @ref page_samples_dialup
|
||||||
@li @ref page_samples_dnd
|
@li @ref page_samples_dnd
|
||||||
|
@li @ref page_samples_docview
|
||||||
|
@li @ref page_samples_dragimag
|
||||||
@li @ref page_samples_event
|
@li @ref page_samples_event
|
||||||
</td><td>
|
</td><td>
|
||||||
@li @ref page_samples_except
|
@li @ref page_samples_except
|
||||||
@@ -89,16 +91,13 @@ name. Most classes contained in wxWidgets occur in at least one of the samples.
|
|||||||
|
|
||||||
TODO: write descriptions for the samples:
|
TODO: write descriptions for the samples:
|
||||||
|
|
||||||
aui
|
|
||||||
caret
|
caret
|
||||||
collpane
|
collpane
|
||||||
combo
|
combo
|
||||||
console
|
console
|
||||||
dataview
|
dataview
|
||||||
display
|
display
|
||||||
docview
|
|
||||||
docvwmdi
|
docvwmdi
|
||||||
dragimag
|
|
||||||
drawing
|
drawing
|
||||||
editlbox
|
editlbox
|
||||||
erase
|
erase
|
||||||
@@ -144,20 +143,20 @@ xrc
|
|||||||
<hr>
|
<hr>
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_access Accessibility sample
|
@section page_samples_access Accessibility Sample
|
||||||
|
|
||||||
The @c access sample shows how you can use the wxAccessible classes in a
|
The @c access sample shows how you can use the wxAccessible classes in a
|
||||||
simple GUI program.
|
simple GUI program.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_animate Animate sample
|
@section page_samples_animate Animate Sample
|
||||||
|
|
||||||
The @c animate sample shows how you can use wxAnimationCtrl
|
The @c animate sample shows how you can use wxAnimationCtrl
|
||||||
control and shows concept of a platform-dependent animation encapsulated
|
control and shows concept of a platform-dependent animation encapsulated
|
||||||
in wxAnimation.
|
in wxAnimation.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_artprovider Art provider sample
|
@section page_samples_artprovider Art Provider Sample
|
||||||
|
|
||||||
The @c artprov sample shows how you can customize the look of standard
|
The @c artprov sample shows how you can customize the look of standard
|
||||||
wxWidgets dialogs by replacing default bitmaps/icons with your own versions.
|
wxWidgets dialogs by replacing default bitmaps/icons with your own versions.
|
||||||
@@ -165,14 +164,19 @@ It also shows how you can use wxArtProvider to
|
|||||||
get stock bitmaps for use in your application.
|
get stock bitmaps for use in your application.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_calendar Calendar sample
|
@section page_samples_aui wxAUI Sample
|
||||||
|
|
||||||
|
@todo Write sample description.
|
||||||
|
|
||||||
|
|
||||||
|
@section page_samples_calendar Calendar Sample
|
||||||
|
|
||||||
This font shows the calendar control in action. It
|
This font shows the calendar control in action. It
|
||||||
shows how to configure the control (see the different options in the calendar
|
shows how to configure the control (see the different options in the calendar
|
||||||
menu) and also how to process the notifications from it.
|
menu) and also how to process the notifications from it.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_config Config sample
|
@section page_samples_config Config Sample
|
||||||
|
|
||||||
This sample demonstrates the wxConfig classes in a platform
|
This sample demonstrates the wxConfig classes in a platform
|
||||||
independent way, i.e. it uses text based files to store a given configuration under
|
independent way, i.e. it uses text based files to store a given configuration under
|
||||||
@@ -181,7 +185,7 @@ Unix and uses the Registry under Windows.
|
|||||||
See @ref overview_config for the descriptions of all features of this class.
|
See @ref overview_config for the descriptions of all features of this class.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_controls Controls sample
|
@section page_samples_controls Controls Sample
|
||||||
|
|
||||||
The controls sample is the main test program for most simple controls used in
|
The controls sample is the main test program for most simple controls used in
|
||||||
wxWidgets. The sample tests their basic functionality, events, placement,
|
wxWidgets. The sample tests their basic functionality, events, placement,
|
||||||
@@ -211,7 +215,7 @@ The various controls tested are listed here:
|
|||||||
@li wxSlider
|
@li wxSlider
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_debugrpt DebugRpt sample
|
@section page_samples_debugrpt DebugRpt Sample
|
||||||
|
|
||||||
This sample shows how to use wxDebugReport class to
|
This sample shows how to use wxDebugReport class to
|
||||||
generate a debug report in case of a program crash or otherwise. On start up,
|
generate a debug report in case of a program crash or otherwise. On start up,
|
||||||
@@ -226,13 +230,13 @@ a Web server accepting form uploads, otherwise
|
|||||||
wxDebugReportUpload will report an error.
|
wxDebugReportUpload will report an error.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_dialogs Dialogs sample
|
@section page_samples_dialogs Dialogs Sample
|
||||||
|
|
||||||
This sample shows how to use the common dialogs available from wxWidgets. These
|
This sample shows how to use the common dialogs available from wxWidgets. These
|
||||||
dialogs are described in detail in the @ref overview_cmndlg.
|
dialogs are described in detail in the @ref overview_cmndlg.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_dialup Dialup sample
|
@section page_samples_dialup Dialup Sample
|
||||||
|
|
||||||
This sample shows the wxDialUpManager
|
This sample shows the wxDialUpManager
|
||||||
class. In the status bar, it displays the information gathered through its
|
class. In the status bar, it displays the information gathered through its
|
||||||
@@ -246,7 +250,7 @@ modem attached and (this only makes sense for Windows) list the available
|
|||||||
connections.
|
connections.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_dnd DnD sample
|
@section page_samples_dnd DnD Sample
|
||||||
|
|
||||||
This sample shows both clipboard and drag and drop in action. It is quite non
|
This sample shows both clipboard and drag and drop in action. It is quite non
|
||||||
trivial and may be safely used as a basis for implementing the clipboard and
|
trivial and may be safely used as a basis for implementing the clipboard and
|
||||||
@@ -285,7 +289,17 @@ Take a look at DnDShapeDataObject class to see how you may use
|
|||||||
wxDataObject to achieve this.
|
wxDataObject to achieve this.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_event Event sample
|
@section page_samples_docview Document/View Sample
|
||||||
|
|
||||||
|
@todo Write sample description.
|
||||||
|
|
||||||
|
|
||||||
|
@section page_samples_dragimag wxDragImage Sample
|
||||||
|
|
||||||
|
@todo Write sample description.
|
||||||
|
|
||||||
|
|
||||||
|
@section page_samples_event Event Sample
|
||||||
|
|
||||||
The event sample demonstrates various features of the wxWidgets events. It
|
The event sample demonstrates various features of the wxWidgets events. It
|
||||||
shows using dynamic events and connecting/disconnecting the event handlers
|
shows using dynamic events and connecting/disconnecting the event handlers
|
||||||
@@ -294,7 +308,7 @@ PushEventHandler() and
|
|||||||
PopEventHandler().
|
PopEventHandler().
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_except Except(ions) sample
|
@section page_samples_except Except(ions) Sample
|
||||||
|
|
||||||
This very simple sample shows how to use C++ exceptions in wxWidgets programs,
|
This very simple sample shows how to use C++ exceptions in wxWidgets programs,
|
||||||
i.e. where to catch the exception which may be thrown by the program code. It
|
i.e. where to catch the exception which may be thrown by the program code. It
|
||||||
@@ -306,7 +320,7 @@ and compile your code with C++ exceptions support to be able to build this
|
|||||||
sample.
|
sample.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_exec Exec sample
|
@section page_samples_exec Exec Sample
|
||||||
|
|
||||||
The exec sample demonstrates the wxExecute and
|
The exec sample demonstrates the wxExecute and
|
||||||
wxShell functions. Both of them are used to execute the
|
wxShell functions. Both of them are used to execute the
|
||||||
@@ -319,7 +333,7 @@ wxProcess::Kill and test for their existence with
|
|||||||
wxProcess::Exists.
|
wxProcess::Exists.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_font Font sample
|
@section page_samples_font Font Sample
|
||||||
|
|
||||||
The font sample demonstrates wxFont,
|
The font sample demonstrates wxFont,
|
||||||
wxFontEnumerator and
|
wxFontEnumerator and
|
||||||
@@ -328,12 +342,12 @@ available (to wxWidgets) on the computer and shows all characters of the
|
|||||||
chosen font as well.
|
chosen font as well.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_grid Grid sample
|
@section page_samples_grid Grid Sample
|
||||||
|
|
||||||
@todo WRITE THIS DESCRIPTION.
|
@todo Write sample description.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_html HTML samples
|
@section page_samples_html HTML Sample
|
||||||
|
|
||||||
Eight HTML samples (you can find them in directory @c samples/html)
|
Eight HTML samples (you can find them in directory @c samples/html)
|
||||||
cover all features of the HTML sub-library.
|
cover all features of the HTML sub-library.
|
||||||
@@ -365,7 +379,7 @@ while @e Helpview is a simple tool that only pops up the help window and
|
|||||||
displays help books given at command line.
|
displays help books given at command line.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_image Image sample
|
@section page_samples_image Image Sample
|
||||||
|
|
||||||
The image sample demonstrates use of the wxImage class
|
The image sample demonstrates use of the wxImage class
|
||||||
and shows how to download images in a variety of formats, currently PNG, GIF,
|
and shows how to download images in a variety of formats, currently PNG, GIF,
|
||||||
@@ -387,7 +401,7 @@ This sample also contains the code for testing the image rotation and resizing
|
|||||||
and using raw bitmap access, see the corresponding menu commands.
|
and using raw bitmap access, see the corresponding menu commands.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_internat Internat(ionalization) sample
|
@section page_samples_internat Internat(ionalization) Sample
|
||||||
|
|
||||||
The not very clearly named internat sample demonstrates the wxWidgets
|
The not very clearly named internat sample demonstrates the wxWidgets
|
||||||
internationalization (i18n for short from now on) features. To be more
|
internationalization (i18n for short from now on) features. To be more
|
||||||
@@ -399,7 +413,7 @@ More information about this sample can be found in the @c readme.txt file in
|
|||||||
its directory. Please also see the @ref overview_i18n.
|
its directory. Please also see the @ref overview_i18n.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_layout Layout sample
|
@section page_samples_layout Layout Sample
|
||||||
|
|
||||||
The layout sample demonstrates the two different layout systems offered
|
The layout sample demonstrates the two different layout systems offered
|
||||||
by wxWidgets. When starting the program, you will see a frame with some
|
by wxWidgets. When starting the program, you will see a frame with some
|
||||||
@@ -416,7 +430,7 @@ showing how to use sizers in connection with a wxNotebook
|
|||||||
class. See also wxSizer.
|
class. See also wxSizer.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_listctrl Listctrl sample
|
@section page_samples_listctrl Listctrl Sample
|
||||||
|
|
||||||
This sample shows the wxListCtrl control. Different modes
|
This sample shows the wxListCtrl control. Different modes
|
||||||
supported by the control (list, icons, small icons, report) may be chosen from
|
supported by the control (list, icons, small icons, report) may be chosen from
|
||||||
@@ -426,7 +440,7 @@ The sample also provides some timings for adding/deleting/sorting a lot of
|
|||||||
(several thousands) items into the control.
|
(several thousands) items into the control.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_mediaplayer Mediaplayer sample
|
@section page_samples_mediaplayer Mediaplayer Sample
|
||||||
|
|
||||||
This sample demonstrates how to use all the features of
|
This sample demonstrates how to use all the features of
|
||||||
wxMediaCtrl and play various types of sound, video,
|
wxMediaCtrl and play various types of sound, video,
|
||||||
@@ -435,7 +449,7 @@ and other files.
|
|||||||
It replaces the old dynamic sample.
|
It replaces the old dynamic sample.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_minimal Minimal sample
|
@section page_samples_minimal Minimal Sample
|
||||||
|
|
||||||
The minimal sample is what most people will know under the term Hello World,
|
The minimal sample is what most people will know under the term Hello World,
|
||||||
i.e. a minimal program that doesn't demonstrate anything apart from what is
|
i.e. a minimal program that doesn't demonstrate anything apart from what is
|
||||||
@@ -443,7 +457,7 @@ needed to write a program that will display a "hello" dialog. This is usually
|
|||||||
a good starting point for learning how to use wxWidgets.
|
a good starting point for learning how to use wxWidgets.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_notebook Notebook sample
|
@section page_samples_notebook Notebook Sample
|
||||||
|
|
||||||
This samples shows wxBookCtrl family of controls.
|
This samples shows wxBookCtrl family of controls.
|
||||||
Although initially it was written to demonstrate wxNotebook
|
Although initially it was written to demonstrate wxNotebook
|
||||||
@@ -453,14 +467,14 @@ Test each of the controls, their orientation, images and pages using
|
|||||||
commands through menu.
|
commands through menu.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_render Render sample
|
@section page_samples_render Render Sample
|
||||||
|
|
||||||
This sample shows how to replace the default wxWidgets
|
This sample shows how to replace the default wxWidgets
|
||||||
renderer and also how to write a shared library
|
renderer and also how to write a shared library
|
||||||
(DLL) implementing a renderer and load and unload it during the run-time.
|
(DLL) implementing a renderer and load and unload it during the run-time.
|
||||||
|
|
||||||
|
|
||||||
@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
|
||||||
@@ -473,7 +487,7 @@ the aim to prevent unnecessary drawing in the window and thus reducing or removi
|
|||||||
flicker on screen.
|
flicker on screen.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_sockets Sockets sample
|
@section page_samples_sockets Sockets Sample
|
||||||
|
|
||||||
The sockets sample demonstrates how to use the communication facilities
|
The sockets sample demonstrates how to use the communication facilities
|
||||||
provided by wxSocket. There are two different
|
provided by wxSocket. There are two different
|
||||||
@@ -524,13 +538,13 @@ The sockets sample is work in progress. Some things to do:
|
|||||||
@li New samples which actually do something useful (suggestions accepted).
|
@li New samples which actually do something useful (suggestions accepted).
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_sound Sound sample
|
@section page_samples_sound Sound Sample
|
||||||
|
|
||||||
The @c sound sample shows how to use wxSound for simple
|
The @c sound sample shows how to use wxSound for simple
|
||||||
audio output (e.g. notifications).
|
audio output (e.g. notifications).
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_statbar Statbar sample
|
@section page_samples_statbar Statbar Sample
|
||||||
|
|
||||||
This sample shows how to create and use wxStatusBar. Although most of the
|
This sample shows how to create and use wxStatusBar. Although most of the
|
||||||
samples have a statusbar, they usually only create a default one and only
|
samples have a statusbar, they usually only create a default one and only
|
||||||
@@ -541,7 +555,7 @@ of fields) and how to use it to show icons/bitmaps and/or put arbitrary
|
|||||||
controls into it.
|
controls into it.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_taborder Tab order sample
|
@section page_samples_taborder Tab Order Sample
|
||||||
|
|
||||||
This sample allows to test keyboard navigation (mostly done using the
|
This sample allows to test keyboard navigation (mostly done using the
|
||||||
@c TAB key, hence the sample name) between different controls.
|
@c TAB key, hence the sample name) between different controls.
|
||||||
@@ -552,7 +566,7 @@ wxWindow::Navigate() for moving focus along this
|
|||||||
chain.
|
chain.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_text Text sample
|
@section page_samples_text Text Sample
|
||||||
|
|
||||||
This sample demonstrates four features: firstly the use and many variants of
|
This sample demonstrates four features: firstly the use and many variants of
|
||||||
the wxTextCtrl class (single line, multi line, read only,
|
the wxTextCtrl class (single line, multi line, read only,
|
||||||
@@ -574,7 +588,7 @@ Last not least: some of the text controls have tooltips and the sample also show
|
|||||||
how tooltips can be centrally disabled and their latency controlled.
|
how tooltips can be centrally disabled and their latency controlled.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_thread Thread sample
|
@section page_samples_thread Thread Sample
|
||||||
|
|
||||||
This sample demonstrates use of threads in connection with GUI programs.
|
This sample demonstrates use of threads in connection with GUI programs.
|
||||||
There are two fundamentally different ways to use threads in GUI programs and
|
There are two fundamentally different ways to use threads in GUI programs and
|
||||||
@@ -595,7 +609,7 @@ used and tested in the sample as well.
|
|||||||
See also @ref overview_thread and wxThread.
|
See also @ref overview_thread and wxThread.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_toolbar Toolbar sample
|
@section page_samples_toolbar Toolbar Sample
|
||||||
|
|
||||||
The toolbar sample shows the wxToolBar class in action.
|
The toolbar sample shows the wxToolBar class in action.
|
||||||
|
|
||||||
@@ -620,7 +634,7 @@ group, i.e. checking any of them automatically unchecks the previously
|
|||||||
checked one.
|
checked one.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_treectrl Treectrl sample
|
@section page_samples_treectrl Treectrl Sample
|
||||||
|
|
||||||
This sample demonstrates using the wxTreeCtrl class. Here
|
This sample demonstrates using the wxTreeCtrl class. Here
|
||||||
you may see how to process various notification messages sent by this control
|
you may see how to process various notification messages sent by this control
|
||||||
@@ -632,7 +646,7 @@ sorting (in default alphabetical order as well as in custom one) is
|
|||||||
demonstrated here as well - try the corresponding menu entries.
|
demonstrated here as well - try the corresponding menu entries.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_widgets Widgets sample
|
@section page_samples_widgets Widgets Sample
|
||||||
|
|
||||||
The widgets sample is the main presentation program for most simple and advanced
|
The widgets sample is the main presentation program for most simple and advanced
|
||||||
native controls and complex generic widgets provided by wxWidgets.
|
native controls and complex generic widgets provided by wxWidgets.
|
||||||
@@ -642,7 +656,7 @@ the controls programmatically, such as adding an item to a list box etc.
|
|||||||
All widgets are categorized for easy browsing.
|
All widgets are categorized for easy browsing.
|
||||||
|
|
||||||
|
|
||||||
@section page_samples_wizard Wizard sample
|
@section page_samples_wizard Wizard Sample
|
||||||
|
|
||||||
This sample shows the so-called wizard dialog (implemented using
|
This sample shows the so-called wizard dialog (implemented using
|
||||||
wxWizard and related classes). It shows almost all
|
wxWizard and related classes). It shows almost all
|
||||||
|
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: docmdi.h
|
// Name: docmdi.h
|
||||||
// Purpose: interface of wxDocMDIParentFrame
|
// Purpose: interface of wxDocMDIParentFrame and wxDocMDIChildFrame
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -11,18 +11,16 @@
|
|||||||
@wxheader{docmdi.h}
|
@wxheader{docmdi.h}
|
||||||
|
|
||||||
The wxDocMDIParentFrame class provides a default top-level frame for
|
The wxDocMDIParentFrame class provides a default top-level frame for
|
||||||
applications using the document/view framework. This class can only be used for
|
applications using the document/view framework. This class can only be used
|
||||||
MDI parent frames.
|
for MDI parent frames.
|
||||||
|
|
||||||
It cooperates with the wxView, wxDocument,
|
It cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate
|
||||||
wxDocManager and wxDocTemplates() classes.
|
classes.
|
||||||
|
|
||||||
See the example application in @c samples/docview.
|
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{FIXME}
|
@category{docview}
|
||||||
|
|
||||||
@see @ref overview_docviewoverview, wxMDIParentFrame
|
@see @ref overview_docview, @ref page_samples_docview, wxMDIParentFrame
|
||||||
*/
|
*/
|
||||||
class wxDocMDIParentFrame : public wxMDIParentFrame
|
class wxDocMDIParentFrame : public wxMDIParentFrame
|
||||||
{
|
{
|
||||||
@@ -59,8 +57,21 @@ public:
|
|||||||
/**
|
/**
|
||||||
Deletes all views and documents. If no user input cancelled the
|
Deletes all views and documents. If no user input cancelled the
|
||||||
operation, the frame will be destroyed and the application will exit.
|
operation, the frame will be destroyed and the application will exit.
|
||||||
Since understanding how document/view clean-up takes place can be difficult,
|
|
||||||
the implementation of this function is shown below.
|
Since understanding how document/view clean-up takes place can be
|
||||||
|
difficult, the implementation of this function is shown below:
|
||||||
|
|
||||||
|
@code
|
||||||
|
void wxDocParentFrame::OnCloseWindow(wxCloseEvent& event)
|
||||||
|
{
|
||||||
|
if (m_docManager->Clear(!event.CanVeto()))
|
||||||
|
{
|
||||||
|
this->Destroy();
|
||||||
|
}
|
||||||
|
else
|
||||||
|
event.Veto();
|
||||||
|
}
|
||||||
|
@endcode
|
||||||
*/
|
*/
|
||||||
void OnCloseWindow(wxCloseEvent& event);
|
void OnCloseWindow(wxCloseEvent& event);
|
||||||
};
|
};
|
||||||
@@ -71,19 +82,18 @@ public:
|
|||||||
@class wxDocMDIChildFrame
|
@class wxDocMDIChildFrame
|
||||||
@wxheader{docmdi.h}
|
@wxheader{docmdi.h}
|
||||||
|
|
||||||
The wxDocMDIChildFrame class provides a default frame for displaying documents
|
The wxDocMDIChildFrame class provides a default frame for displaying
|
||||||
on separate windows. This class can only be used for MDI child frames.
|
documents on separate windows. This class can only be used for MDI child
|
||||||
|
frames.
|
||||||
|
|
||||||
The class is part of the document/view framework supported by wxWidgets,
|
The class is part of the document/view framework supported by wxWidgets,
|
||||||
and cooperates with the wxView, wxDocument,
|
and cooperates with the wxView, wxDocument, wxDocManager and wxDocTemplate
|
||||||
wxDocManager and wxDocTemplate classes.
|
classes.
|
||||||
|
|
||||||
See the example application in @c samples/docview.
|
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{FIXME}
|
@category{docview}
|
||||||
|
|
||||||
@see @ref overview_docviewoverview, wxMDIChildFrame
|
@see @ref overview_docview, @ref page_samples_docview, wxMDIChildFrame
|
||||||
*/
|
*/
|
||||||
class wxDocMDIChildFrame : public wxMDIChildFrame
|
class wxDocMDIChildFrame : public wxMDIChildFrame
|
||||||
{
|
{
|
||||||
@@ -92,8 +102,7 @@ public:
|
|||||||
Constructor.
|
Constructor.
|
||||||
*/
|
*/
|
||||||
wxDocMDIChildFrame(wxDocument* doc, wxView* view,
|
wxDocMDIChildFrame(wxDocument* doc, wxView* view,
|
||||||
wxFrame* parent,
|
wxFrame* parent, wxWindowID id,
|
||||||
wxWindowID id,
|
|
||||||
const wxString& title,
|
const wxString& title,
|
||||||
const wxPoint& pos = wxDefaultPosition,
|
const wxPoint& pos = wxDefaultPosition,
|
||||||
const wxSize& size = wxDefaultSize,
|
const wxSize& size = wxDefaultSize,
|
||||||
@@ -136,16 +145,5 @@ public:
|
|||||||
Sets the view for this frame.
|
Sets the view for this frame.
|
||||||
*/
|
*/
|
||||||
void SetView(wxView* view);
|
void SetView(wxView* view);
|
||||||
|
|
||||||
/**
|
|
||||||
wxDocument* m_childDocument
|
|
||||||
The document associated with the frame.
|
|
||||||
*/
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
wxView* m_childView
|
|
||||||
The view associated with the frame.
|
|
||||||
*/
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
1002
interface/docview.h
1002
interface/docview.h
File diff suppressed because it is too large
Load Diff
@@ -10,89 +10,138 @@
|
|||||||
@class wxDragImage
|
@class wxDragImage
|
||||||
@wxheader{dragimag.h}
|
@wxheader{dragimag.h}
|
||||||
|
|
||||||
This class is used when you wish to drag an object on the screen,
|
This class is used when you wish to drag an object on the screen, and a
|
||||||
and a simple cursor is not enough.
|
simple cursor is not enough.
|
||||||
|
|
||||||
On Windows, the Win32 API is used to achieve smooth dragging. On other
|
On Windows, the Win32 API is used to achieve smooth dragging. On other
|
||||||
platforms,
|
platforms, wxGenericDragImage is used. Applications may also prefer to use
|
||||||
wxGenericDragImage is used. Applications may also prefer to use
|
|
||||||
wxGenericDragImage on Windows, too.
|
wxGenericDragImage on Windows, too.
|
||||||
|
|
||||||
@b wxPython note: wxPython uses wxGenericDragImage on all platforms, but
|
@beginWxPythonOnly
|
||||||
uses the wxDragImage name.
|
wxPython uses wxGenericDragImage on all platforms, but uses the wxDragImage
|
||||||
|
name.
|
||||||
|
@endWxPythonOnly
|
||||||
|
|
||||||
To use this class, when you wish to start dragging an image, create a
|
To use this class, when you wish to start dragging an image, create a
|
||||||
wxDragImage
|
wxDragImage object and store it somewhere you can access it as the drag
|
||||||
object and store it somewhere you can access it as the drag progresses.
|
progresses. Call BeginDrag() to start, and EndDrag() to stop the drag. To
|
||||||
Call BeginDrag to start, and EndDrag to stop the drag. To move the image,
|
move the image, initially call Show() and then Move(). If you wish to
|
||||||
initially call Show and then Move. If you wish to update the screen contents
|
update the screen contents during the drag (for example, highlight an item
|
||||||
during the drag (for example, highlight an item as in the dragimag sample),
|
as in the dragimag sample), first call Hide(), update the screen, call
|
||||||
first call Hide,
|
Move(), and then call Show().
|
||||||
update the screen, call Move, and then call Show.
|
|
||||||
|
|
||||||
You can drag within one window, or you can use full-screen dragging
|
You can drag within one window, or you can use full-screen dragging either
|
||||||
either across the whole screen, or just restricted to one area
|
across the whole screen, or just restricted to one area of the screen to
|
||||||
of the screen to save resources. If you want the user to drag between
|
save resources. If you want the user to drag between two windows, then you
|
||||||
two windows, then you will need to use full-screen dragging.
|
will need to use full-screen dragging.
|
||||||
|
|
||||||
If you wish to draw the image yourself, use wxGenericDragImage and
|
If you wish to draw the image yourself, use wxGenericDragImage and override
|
||||||
override wxDragImage::DoDrawImage and
|
DoDrawImage() and GetImageRect().
|
||||||
wxDragImage::GetImageRect.
|
|
||||||
|
|
||||||
Please see @c samples/dragimag for an example.
|
|
||||||
|
|
||||||
@library{wxcore}
|
@library{wxcore}
|
||||||
@category{FIXME}
|
@category{dnd}
|
||||||
|
|
||||||
|
@see @ref page_samples_dragimag
|
||||||
*/
|
*/
|
||||||
class wxDragImage : public wxObject
|
class wxDragImage : public wxObject
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
)
|
Default constructor.
|
||||||
Constructs a drag image an optional cursor. This constructor is only available
|
*/
|
||||||
for
|
wxDragImage();
|
||||||
wxGenericDragImage, and can be used when the application
|
/**
|
||||||
supplies DoDrawImage() and GetImageRect().
|
Constructs a drag image from a bitmap and optional cursor.
|
||||||
|
|
||||||
@param image
|
@param image
|
||||||
Icon or bitmap to be used as the drag image. The bitmap can
|
Bitmap to be used as the drag image. The bitmap can have a mask.
|
||||||
have a mask.
|
@param cursor
|
||||||
|
Optional cursor to combine with the image.
|
||||||
|
@param cursorHotspot
|
||||||
|
This parameter is deprecated.
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxBitmap& image, const wxCursor& cursor = wxNullCursor,
|
||||||
|
const wxPoint& cursorHotspot = wxPoint(0, 0));
|
||||||
|
/**
|
||||||
|
Constructs a drag image from an icon and optional cursor.
|
||||||
|
|
||||||
|
@param image
|
||||||
|
Icon to be used as the drag image.
|
||||||
|
@param cursor
|
||||||
|
Optional cursor to combine with the image.
|
||||||
|
@param cursorHotspot
|
||||||
|
This parameter is deprecated.
|
||||||
|
|
||||||
|
@beginWxPythonOnly
|
||||||
|
This constructor is called wxDragIcon in wxPython.
|
||||||
|
@endWxPythonOnly
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxIcon& image, const wxCursor& cursor = wxNullCursor,
|
||||||
|
const wxPoint& cursorHotspot = wxPoint(0, 0));
|
||||||
|
/**
|
||||||
|
Constructs a drag image from a text string and optional cursor.
|
||||||
|
|
||||||
@param text
|
@param text
|
||||||
Text used to construct a drag image.
|
Text used to construct a drag image.
|
||||||
@param cursor
|
@param cursor
|
||||||
Optional cursor to combine with the image.
|
Optional cursor to combine with the image.
|
||||||
@param hotspot
|
@param cursorHotspot
|
||||||
This parameter is deprecated.
|
This parameter is deprecated.
|
||||||
|
|
||||||
|
@beginWxPythonOnly
|
||||||
|
This constructor is called wxDragString in wxPython.
|
||||||
|
@endWxPythonOnly
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxString& text, const wxCursor& cursor = wxNullCursor,
|
||||||
|
const wxPoint& cursorHotspot = wxPoint(0, 0));
|
||||||
|
/**
|
||||||
|
Constructs a drag image from the text in the given tree control item,
|
||||||
|
and optional cursor.
|
||||||
|
|
||||||
@param treeCtrl
|
@param treeCtrl
|
||||||
Tree control for constructing a tree drag image.
|
Tree control for constructing a tree drag image.
|
||||||
|
@param id
|
||||||
|
Tree control item id.
|
||||||
|
|
||||||
|
@beginWxPythonOnly
|
||||||
|
This constructor is called wxDragTreeItem in wxPython.
|
||||||
|
@endWxPythonOnly
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
|
||||||
|
/**
|
||||||
|
Constructs a drag image from the text in the given list control item,
|
||||||
|
and optional cursor.
|
||||||
|
|
||||||
@param listCtrl
|
@param listCtrl
|
||||||
List control for constructing a list drag image.
|
List control for constructing a list drag image.
|
||||||
@param id
|
@param id
|
||||||
Tree or list control item id.
|
List control item id.
|
||||||
*/
|
|
||||||
wxDragImage();
|
|
||||||
wxDragImage(const wxBitmap& image,
|
|
||||||
const wxCursor& cursor = wxNullCursor);
|
|
||||||
wxDragImage(const wxIcon& image,
|
|
||||||
const wxCursor& cursor = wxNullCursor);
|
|
||||||
wxDragImage(const wxString& text,
|
|
||||||
const wxCursor& cursor = wxNullCursor);
|
|
||||||
wxDragImage(const wxTreeCtrl& treeCtrl, wxTreeItemId& id);
|
|
||||||
wxDragImage(const wxListCtrl& treeCtrl, long id);
|
|
||||||
wxDragImage(const wxCursor& cursor = wxNullCursor);
|
|
||||||
//@}
|
|
||||||
|
|
||||||
//@{
|
@beginWxPythonOnly
|
||||||
|
This constructor is called wxDragListItem in wxPython.
|
||||||
|
@endWxPythonOnly
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxListCtrl& listCtrl, long id);
|
||||||
/**
|
/**
|
||||||
Start dragging the image, using the first window to capture the mouse and the
|
Constructs a drag image an optional cursor. This constructor is only
|
||||||
second
|
available for wxGenericDragImage, and can be used when the application
|
||||||
to specify the bounding area. This form is equivalent to using the first form,
|
supplies DoDrawImage() and GetImageRect().
|
||||||
but more convenient than working out the bounding rectangle explicitly.
|
|
||||||
You need to then call Show()
|
@param cursor
|
||||||
and Move() to show the image on the screen.
|
Optional cursor to combine with the image.
|
||||||
Call EndDrag() when the drag has finished.
|
@param cursorHotspot
|
||||||
Note that this call automatically calls CaptureMouse.
|
This parameter is deprecated.
|
||||||
|
*/
|
||||||
|
wxDragImage(const wxCursor& cursor = wxNullCursor,
|
||||||
|
const wxPoint& cursorHotspot = wxPoint(0, 0));
|
||||||
|
|
||||||
|
/**
|
||||||
|
Start dragging the image, in a window or full screen.
|
||||||
|
|
||||||
|
You need to then call Show() and Move() to show the image on the
|
||||||
|
screen. Call EndDrag() when the drag has finished.
|
||||||
|
|
||||||
|
Note that this call automatically calls CaptureMouse().
|
||||||
|
|
||||||
@param hotspot
|
@param hotspot
|
||||||
The location of the drag position relative to the upper-left corner
|
The location of the drag position relative to the upper-left corner
|
||||||
@@ -100,72 +149,87 @@ public:
|
|||||||
@param window
|
@param window
|
||||||
The window that captures the mouse, and within which the dragging
|
The window that captures the mouse, and within which the dragging
|
||||||
is limited unless fullScreen is @true.
|
is limited unless fullScreen is @true.
|
||||||
@param boundingWindow
|
|
||||||
In the second form of the function, specifies the
|
|
||||||
area within which the drag occurs.
|
|
||||||
@param fullScreen
|
@param fullScreen
|
||||||
If @true, specifies that the drag will be visible over the full
|
If @true, specifies that the drag will be visible over the full
|
||||||
screen, or over as much of the screen as is specified by rect. Note that
|
screen, or over as much of the screen as is specified by rect. Note
|
||||||
the mouse will
|
that the mouse will still be captured in window.
|
||||||
still be captured in window.
|
|
||||||
@param rect
|
@param rect
|
||||||
If non-@NULL, specifies the rectangle (in screen coordinates) that
|
If non-@NULL, specifies the rectangle (in screen coordinates) that
|
||||||
bounds the dragging operation. Specifying this can make the operation more
|
bounds the dragging operation. Specifying this can make the
|
||||||
efficient
|
operation more efficient by cutting down on the area under
|
||||||
by cutting down on the area under consideration, and it can also make a
|
consideration, and it can also make a visual difference since the
|
||||||
visual difference
|
drag is clipped to this area.
|
||||||
since the drag is clipped to this area.
|
|
||||||
*/
|
*/
|
||||||
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
||||||
bool fullScreen = false,
|
bool fullScreen = false, wxRect* rect = NULL);
|
||||||
wxRect* rect = NULL);
|
/**
|
||||||
|
Start dragging the image, using the first window to capture the mouse
|
||||||
|
and the second to specify the bounding area. This form is equivalent to
|
||||||
|
using the first form, but more convenient than working out the bounding
|
||||||
|
rectangle explicitly.
|
||||||
|
|
||||||
|
You need to then call Show() and Move() to show the image on the
|
||||||
|
screen. Call EndDrag() when the drag has finished.
|
||||||
|
|
||||||
|
Note that this call automatically calls CaptureMouse().
|
||||||
|
|
||||||
|
@param hotspot
|
||||||
|
The location of the drag position relative to the upper-left corner
|
||||||
|
of the image.
|
||||||
|
@param window
|
||||||
|
The window that captures the mouse, and within which the dragging
|
||||||
|
is limited.
|
||||||
|
@param boundingWindow
|
||||||
|
Specifies the area within which the drag occurs.
|
||||||
|
*/
|
||||||
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
bool BeginDrag(const wxPoint& hotspot, wxWindow* window,
|
||||||
wxWindow* boundingWindow);
|
wxWindow* boundingWindow);
|
||||||
//@}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Draws the image on the device context with top-left corner at the given
|
Draws the image on the device context with top-left corner at the given
|
||||||
position.
|
position.
|
||||||
This function is only available with wxGenericDragImage, to allow applications
|
|
||||||
to
|
This function is only available with wxGenericDragImage, to allow
|
||||||
draw their own image instead of using an actual bitmap. If you override this
|
applications to draw their own image instead of using an actual bitmap.
|
||||||
function,
|
If you override this function, you must also override GetImageRect().
|
||||||
you must also override GetImageRect().
|
|
||||||
*/
|
*/
|
||||||
virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos);
|
virtual bool DoDrawImage(wxDC& dc, const wxPoint& pos);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Call this when the drag has finished.
|
Call this when the drag has finished.
|
||||||
Note that this call automatically calls ReleaseMouse.
|
|
||||||
|
@note This function automatically releases mouse capture.
|
||||||
*/
|
*/
|
||||||
bool EndDrag();
|
bool EndDrag();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the rectangle enclosing the image, assuming that the image is drawn
|
Returns the rectangle enclosing the image, assuming that the image is
|
||||||
with its
|
drawn with its top-left corner at the given point.
|
||||||
top-left corner at the given point.
|
|
||||||
This function is available in wxGenericDragImage only, and may be overridden
|
This function is available in wxGenericDragImage only, and may be
|
||||||
(together with
|
overridden (together with DoDrawImage()) to provide a virtual drawing
|
||||||
wxDragImage::DoDrawImage) to provide a virtual drawing capability.
|
capability.
|
||||||
*/
|
*/
|
||||||
virtual wxRect GetImageRect(const wxPoint& pos) const;
|
virtual wxRect GetImageRect(const wxPoint& pos) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Hides the image. You may wish to call this before updating the window
|
Hides the image. You may wish to call this before updating the window
|
||||||
contents (perhaps highlighting an item). Then call Move()
|
contents (perhaps highlighting an item). Then call Move() and Show().
|
||||||
and Show().
|
|
||||||
*/
|
*/
|
||||||
bool Hide();
|
bool Hide();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Call this to move the image to a new position. The image will only be shown if
|
Call this to move the image to a new position. The image will only be
|
||||||
Show() has been called previously (for example
|
shown if Show() has been called previously (for example at the start of
|
||||||
at the start of the drag).
|
the drag).
|
||||||
@a pt is the position in client coordinates (relative to the window specified
|
|
||||||
in BeginDrag).
|
@param pt
|
||||||
You can move the image either when the image is hidden or shown, but in general
|
The position in client coordinates (relative to the window
|
||||||
dragging
|
specified in BeginDrag()).
|
||||||
will be smoother if you move the image when it is shown.
|
|
||||||
|
You can move the image either when the image is hidden or shown, but in
|
||||||
|
general dragging will be smoother if you move the image when it is
|
||||||
|
shown.
|
||||||
*/
|
*/
|
||||||
bool Move(const wxPoint& pt);
|
bool Move(const wxPoint& pt);
|
||||||
|
|
||||||
@@ -175,20 +239,20 @@ public:
|
|||||||
bool Show();
|
bool Show();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Override this if you wish to draw the window contents to the backing bitmap
|
Override this if you wish to draw the window contents to the backing
|
||||||
yourself. This can be desirable if you wish to avoid flicker by not having to
|
bitmap yourself. This can be desirable if you wish to avoid flicker by
|
||||||
redraw the updated window itself just before dragging, which can cause a
|
not having to redraw the updated window itself just before dragging,
|
||||||
flicker just
|
which can cause a flicker just as the drag starts. Instead, paint the
|
||||||
as the drag starts. Instead, paint the drag image's backing bitmap to show the
|
drag image's backing bitmap to show the appropriate graphic @e minus
|
||||||
appropriate
|
the objects to be dragged, and leave the window itself to be updated by
|
||||||
graphic @e minus the objects to be dragged, and leave the window itself to be
|
the drag image. This can provide eerily smooth, flicker-free drag
|
||||||
updated
|
behaviour.
|
||||||
by the drag image. This can provide eerily smooth, flicker-free drag behaviour.
|
|
||||||
The default implementation copies the window contents to the backing bitmap. A
|
The default implementation copies the window contents to the backing
|
||||||
new
|
bitmap. A new implementation will normally copy information from
|
||||||
implementation will normally copy information from another source, such as from
|
another source, such as from its own backing bitmap if it has one, or
|
||||||
its
|
directly from internal data structures.
|
||||||
own backing bitmap if it has one, or directly from internal data structures.
|
|
||||||
This function is available in wxGenericDragImage only.
|
This function is available in wxGenericDragImage only.
|
||||||
*/
|
*/
|
||||||
bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,
|
bool UpdateBackingFromWindow(wxDC& windowDC, wxMemoryDC& destDC,
|
||||||
|
1030
interface/dynarray.h
1030
interface/dynarray.h
File diff suppressed because it is too large
Load Diff
@@ -1,6 +1,6 @@
|
|||||||
/////////////////////////////////////////////////////////////////////////////
|
/////////////////////////////////////////////////////////////////////////////
|
||||||
// Name: dynlib.h
|
// Name: dynlib.h
|
||||||
// Purpose: interface of wxDynamicLibraryDetails
|
// Purpose: interface of wxDynamicLibrary and wxDynamicLibraryDetails
|
||||||
// Author: wxWidgets team
|
// Author: wxWidgets team
|
||||||
// RCS-ID: $Id$
|
// RCS-ID: $Id$
|
||||||
// Licence: wxWindows license
|
// Licence: wxWindows license
|
||||||
@@ -10,14 +10,14 @@
|
|||||||
@class wxDynamicLibraryDetails
|
@class wxDynamicLibraryDetails
|
||||||
@wxheader{dynlib.h}
|
@wxheader{dynlib.h}
|
||||||
|
|
||||||
This class is used for the objects returned by
|
This class is used for the objects returned by the
|
||||||
wxDynamicLibrary::ListLoaded method and
|
wxDynamicLibrary::ListLoaded() method and contains the information about a
|
||||||
contains the information about a single module loaded into the address space of
|
single module loaded into the address space of the current process. A
|
||||||
the current process. A module in this context may be either a dynamic library
|
module in this context may be either a dynamic library or the main program
|
||||||
or the main program itself.
|
itself.
|
||||||
|
|
||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{FIXME}
|
@category{appmanagement}
|
||||||
*/
|
*/
|
||||||
class wxDynamicLibraryDetails
|
class wxDynamicLibraryDetails
|
||||||
{
|
{
|
||||||
@@ -26,33 +26,32 @@ public:
|
|||||||
Retrieves the load address and the size of this module.
|
Retrieves the load address and the size of this module.
|
||||||
|
|
||||||
@param addr
|
@param addr
|
||||||
the pointer to the location to return load address in, may be
|
The pointer to the location to return load address in, may be
|
||||||
@NULL
|
@NULL.
|
||||||
@param len
|
@param len
|
||||||
pointer to the location to return the size of this module in
|
Pointer to the location to return the size of this module in
|
||||||
memory in, may be @NULL
|
memory in, may be @NULL.
|
||||||
|
|
||||||
@returns @true if the load address and module size were retrieved, @false
|
@returns @true if the load address and module size were retrieved,
|
||||||
if this information is not available.
|
@false if this information is not available.
|
||||||
*/
|
*/
|
||||||
bool GetAddress(void** addr, size_t len) const;
|
bool GetAddress(void** addr, size_t len) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the base name of this module, e.g. @c kernel32.dll or
|
Returns the base name of this module, e.g. @c "kernel32.dll" or
|
||||||
@c libc-2.3.2.so.
|
@c "libc-2.3.2.so".
|
||||||
*/
|
*/
|
||||||
wxString GetName() const;
|
wxString GetName() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the full path of this module if available, e.g.
|
Returns the full path of this module if available, e.g.
|
||||||
@c c:\windows\system32\kernel32.dll or
|
@c "c:\windows\system32\kernel32.dll" or @c "/lib/libc-2.3.2.so".
|
||||||
@c /lib/libc-2.3.2.so.
|
|
||||||
*/
|
*/
|
||||||
wxString GetPath() const;
|
wxString GetPath() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the version of this module, e.g. @c 5.2.3790.0 or
|
Returns the version of this module, e.g. @c "5.2.3790.0" or @c "2.3.2".
|
||||||
@c 2.3.2. The returned string is empty if the version information is not
|
The returned string is empty if the version information is not
|
||||||
available.
|
available.
|
||||||
*/
|
*/
|
||||||
wxString GetVersion() const;
|
wxString GetVersion() const;
|
||||||
@@ -61,131 +60,23 @@ public:
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxDllLoader
|
Dynamic library category used with wxDynamicLibrary::CanonicalizeName().
|
||||||
@wxheader{dynlib.h}
|
|
||||||
|
|
||||||
@b Deprecation note: This class is deprecated since version 2.4 and is
|
|
||||||
not compiled in by default in version 2.6 and will be removed in 2.8. Please
|
|
||||||
use wxDynamicLibrary instead.
|
|
||||||
|
|
||||||
wxDllLoader is a class providing an interface similar to Unix's @c dlopen(). It
|
|
||||||
is used by the wxLibrary framework and manages the actual
|
|
||||||
loading of shared libraries and the resolving of symbols in them. There are no
|
|
||||||
instances of this class, it simply serves as a namespace for its static member
|
|
||||||
functions.
|
|
||||||
|
|
||||||
Please note that class wxDynamicLibrary provides
|
|
||||||
alternative, friendlier interface to wxDllLoader.
|
|
||||||
|
|
||||||
The terms @e DLL and @e shared library/object will both be used in the
|
|
||||||
documentation to refer to the same thing: a @c .dll file under Windows or
|
|
||||||
@c .so or @c .sl one under Unix.
|
|
||||||
|
|
||||||
Example of using this class to dynamically load the @c strlen() function:
|
|
||||||
|
|
||||||
@code
|
|
||||||
#if defined(__WXMSW__)
|
|
||||||
static const wxChar *LIB_NAME = _T("kernel32");
|
|
||||||
static const wxChar *FUNC_NAME = _T("lstrlenA");
|
|
||||||
#elif defined(__UNIX__)
|
|
||||||
static const wxChar *LIB_NAME = _T("/lib/libc-2.0.7.so");
|
|
||||||
static const wxChar *FUNC_NAME = _T("strlen");
|
|
||||||
#endif
|
|
||||||
|
|
||||||
wxDllType dllHandle = wxDllLoader::LoadLibrary(LIB_NAME);
|
|
||||||
if ( !dllHandle )
|
|
||||||
{
|
|
||||||
... error ...
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
typedef int (*strlenType)(char *);
|
|
||||||
strlenType pfnStrlen = (strlenType)wxDllLoader::GetSymbol(dllHandle,
|
|
||||||
FUNC_NAME);
|
|
||||||
if ( !pfnStrlen )
|
|
||||||
{
|
|
||||||
... error ...
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if ( pfnStrlen("foo") != 3 )
|
|
||||||
{
|
|
||||||
... error ...
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
... ok! ...
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
wxDllLoader::UnloadLibrary(dllHandle);
|
|
||||||
}
|
|
||||||
@endcode
|
|
||||||
|
|
||||||
@library{wxbase}
|
|
||||||
@category{appmanagement}
|
|
||||||
*/
|
*/
|
||||||
class wxDllLoader
|
enum wxDynamicLibraryCategory
|
||||||
{
|
{
|
||||||
public:
|
wxDL_LIBRARY, ///< Standard library.
|
||||||
/**
|
wxDL_MODULE ///< Loadable module/plugin.
|
||||||
Returns the string containing the usual extension for shared libraries for the
|
|
||||||
given systems (including the leading dot if not empty).
|
|
||||||
For example, this function will return @c ".dll" under Windows or (usually)
|
|
||||||
@c ".so" under Unix.
|
|
||||||
*/
|
|
||||||
static wxString GetDllExt();
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function returns a valid handle for the main program itself. Notice that
|
|
||||||
the @NULL return value is valid for some systems (i.e. doesn't mean that
|
|
||||||
the function failed).
|
|
||||||
@note This function is Unix specific. It will always fail under Windows
|
|
||||||
or OS/2.
|
|
||||||
*/
|
|
||||||
wxDllType GetProgramHandle();
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function resolves a symbol in a loaded DLL, such as a variable or
|
|
||||||
function name.
|
|
||||||
Returned value will be @NULL if the symbol was not found in the DLL or if
|
|
||||||
an error occurred.
|
|
||||||
|
|
||||||
@param dllHandle
|
|
||||||
Valid handle previously returned by
|
|
||||||
LoadLibrary
|
|
||||||
@param name
|
|
||||||
Name of the symbol.
|
|
||||||
*/
|
|
||||||
void* GetSymbol(wxDllType dllHandle, const wxString& name);
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function loads a shared library into memory, with @a libname being the
|
|
||||||
name of the library: it may be either the full name including path and
|
|
||||||
(platform-dependent) extension, just the basename (no path and no extension)
|
|
||||||
or a basename with extension. In the last two cases, the library will be
|
|
||||||
searched in all standard locations.
|
|
||||||
Returns a handle to the loaded DLL. Use @a success parameter to test if it
|
|
||||||
is valid. If the handle is valid, the library must be unloaded later with
|
|
||||||
UnloadLibrary().
|
|
||||||
|
|
||||||
@param libname
|
|
||||||
Name of the shared object to load.
|
|
||||||
@param success
|
|
||||||
May point to a bool variable which will be set to @true or
|
|
||||||
@false; may also be @NULL.
|
|
||||||
*/
|
|
||||||
wxDllType LoadLibrary(const wxString& libname,
|
|
||||||
bool* success = NULL);
|
|
||||||
|
|
||||||
/**
|
|
||||||
This function unloads the shared library. The handle @a dllhandle must have
|
|
||||||
been returned by LoadLibrary() previously.
|
|
||||||
*/
|
|
||||||
void UnloadLibrary(wxDllType dllhandle);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
Dynamic library plugin category used with
|
||||||
|
wxDynamicLibrary::CanonicalizePluginName().
|
||||||
|
*/
|
||||||
|
enum wxPluginCategory
|
||||||
|
{
|
||||||
|
wxDL_PLUGIN_GUI, ///< Plugin that uses GUI classes.
|
||||||
|
wxDL_PLUGIN_BASE ///< wxBase-only plugin.
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@class wxDynamicLibrary
|
@class wxDynamicLibrary
|
||||||
@@ -193,40 +84,46 @@ public:
|
|||||||
|
|
||||||
wxDynamicLibrary is a class representing dynamically loadable library
|
wxDynamicLibrary is a class representing dynamically loadable library
|
||||||
(Windows DLL, shared library under Unix etc.). Just create an object of
|
(Windows DLL, shared library under Unix etc.). Just create an object of
|
||||||
this class to load a library and don't worry about unloading it -- it will be
|
this class to load a library and don't worry about unloading it -- it will
|
||||||
done in the objects destructor automatically.
|
be done in the objects destructor automatically.
|
||||||
|
|
||||||
|
The following flags can be used with wxDynamicLibrary() or Load():
|
||||||
|
|
||||||
|
@beginStyleTable
|
||||||
|
@style{wxDL_LAZY}
|
||||||
|
Equivalent of RTLD_LAZY under Unix, ignored elsewhere.
|
||||||
|
@style{wxDL_NOW}
|
||||||
|
Equivalent of RTLD_NOW under Unix, ignored elsewhere.
|
||||||
|
@style{wxDL_GLOBAL}
|
||||||
|
Equivalent of RTLD_GLOBAL under Unix, ignored elsewhere.
|
||||||
|
@style{wxDL_VERBATIM}
|
||||||
|
Don't try to append the appropriate extension to the library name
|
||||||
|
(this is done by default).
|
||||||
|
@style{wxDL_DEFAULT}
|
||||||
|
Default flags, same as wxDL_NOW currently.
|
||||||
|
@style{wxDL_QUIET}
|
||||||
|
Don't log an error message if the library couldn't be loaded.
|
||||||
|
@endStyleTable
|
||||||
|
|
||||||
@library{wxbase}
|
@library{wxbase}
|
||||||
@category{FIXME}
|
@category{appmanagement}
|
||||||
|
|
||||||
@see wxDynamicLibrary::CanonicalizePluginName
|
|
||||||
*/
|
*/
|
||||||
class wxDynamicLibrary
|
class wxDynamicLibrary
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Constructor. Second form calls Load().
|
Default constructor.
|
||||||
*/
|
*/
|
||||||
wxDynamicLibrary();
|
wxDynamicLibrary();
|
||||||
wxDynamicLibrary(const wxString& name,
|
/**
|
||||||
int flags = wxDL_DEFAULT);
|
Constructor. Calls Load() with the given @a name.
|
||||||
//@}
|
*/
|
||||||
|
wxDynamicLibrary(const wxString& name, int flags = wxDL_DEFAULT);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the platform-specific full name for the library called @e name. E.g.
|
Returns the platform-specific full name for the library called @a name.
|
||||||
it adds a @c ".dll" extension under Windows and @c "lib" prefix and
|
E.g. it adds a @c ".dll" extension under Windows and @c "lib" prefix
|
||||||
@c ".so", @c ".sl" or maybe @c ".dylib" extension under Unix.
|
and @c ".so", @c ".sl" or @c ".dylib" extension under Unix.
|
||||||
The possible values for @a cat are:
|
|
||||||
|
|
||||||
|
|
||||||
wxDL_LIBRARY
|
|
||||||
|
|
||||||
normal library
|
|
||||||
|
|
||||||
wxDL_MODULE
|
|
||||||
|
|
||||||
a loadable module or plugin
|
|
||||||
|
|
||||||
@see CanonicalizePluginName()
|
@see CanonicalizePluginName()
|
||||||
*/
|
*/
|
||||||
@@ -234,29 +131,18 @@ public:
|
|||||||
wxDynamicLibraryCategory cat = wxDL_LIBRARY);
|
wxDynamicLibraryCategory cat = wxDL_LIBRARY);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This function does the same thing as
|
This function does the same thing as CanonicalizeName() but for
|
||||||
CanonicalizeName() but for wxWidgets
|
wxWidgets plugins. The only difference is that compiler and version
|
||||||
plugins. The only difference is that compiler and version information are added
|
information are added to the name to ensure that the plugin which is
|
||||||
to the name to ensure that the plugin which is going to be loaded will be
|
going to be loaded will be compatible with the main program.
|
||||||
compatible with the main program.
|
|
||||||
The possible values for @a cat are:
|
|
||||||
|
|
||||||
|
|
||||||
wxDL_PLUGIN_GUI
|
|
||||||
|
|
||||||
plugin which uses GUI classes (default)
|
|
||||||
|
|
||||||
wxDL_PLUGIN_BASE
|
|
||||||
|
|
||||||
plugin which only uses wxBase
|
|
||||||
*/
|
*/
|
||||||
static wxString CanonicalizePluginName(const wxString& name,
|
static wxString CanonicalizePluginName(const wxString& name,
|
||||||
wxPluginCategory cat = wxDL_PLUGIN_GUI);
|
wxPluginCategory cat = wxDL_PLUGIN_GUI);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Detaches this object from its library handle, i.e. the object will not unload
|
Detaches this object from its library handle, i.e. the object will not
|
||||||
the library any longer in its destructor but it is now the callers
|
unload the library any longer in its destructor but it is now the
|
||||||
responsibility to do this using Unload().
|
callers responsibility to do this using Unload().
|
||||||
*/
|
*/
|
||||||
wxDllType Detach();
|
wxDllType Detach();
|
||||||
|
|
||||||
@@ -267,8 +153,8 @@ public:
|
|||||||
static wxDllType GetProgramHandle();
|
static wxDllType GetProgramHandle();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns pointer to symbol @a name in the library or @NULL if the library
|
Returns pointer to symbol @a name in the library or @NULL if the
|
||||||
contains no such symbol.
|
library contains no such symbol.
|
||||||
|
|
||||||
@see wxDYNLIB_FUNCTION()
|
@see wxDYNLIB_FUNCTION()
|
||||||
*/
|
*/
|
||||||
@@ -276,19 +162,19 @@ public:
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
This function is available only under Windows as it is only useful when
|
This function is available only under Windows as it is only useful when
|
||||||
dynamically loading symbols from standard Windows DLLs. Such functions have
|
dynamically loading symbols from standard Windows DLLs. Such functions
|
||||||
either @c 'A' (in ANSI build) or @c 'W' (in Unicode, or wide
|
have either @c 'A' (in ANSI build) or @c 'W' (in Unicode, or wide
|
||||||
character build) suffix if they take string parameters. Using this function you
|
character build) suffix if they take string parameters. Using this
|
||||||
can use just the base name of the function and the correct suffix is appende
|
function, you can use just the base name of the function and the
|
||||||
automatically depending on the current build. Otherwise, this method is
|
correct suffix is appended automatically depending on the current
|
||||||
identical to GetSymbol().
|
build. Otherwise, this method is identical to GetSymbol().
|
||||||
*/
|
*/
|
||||||
void* GetSymbolAorW(const wxString& name) const;
|
void* GetSymbolAorW(const wxString& name) const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns @true if the symbol with the given @a name is present in the dynamic
|
Returns @true if the symbol with the given @a name is present in the
|
||||||
library, @false otherwise. Unlike GetSymbol(),
|
dynamic library, @false otherwise. Unlike GetSymbol(), this function
|
||||||
this function doesn't log an error message if the symbol is not found.
|
doesn't log an error message if the symbol is not found.
|
||||||
|
|
||||||
@since 2.5.4
|
@since 2.5.4
|
||||||
*/
|
*/
|
||||||
@@ -300,61 +186,41 @@ public:
|
|||||||
bool IsLoaded() const;
|
bool IsLoaded() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
This static method returns an array() containing the details
|
This static method returns a wxArray containing the details of all
|
||||||
of all modules loaded into the address space of the current project, the array
|
modules loaded into the address space of the current project. The array
|
||||||
elements are object of @c wxDynamicLibraryDetails class. The array will
|
elements are objects of the type: wxDynamicLibraryDetails. The array
|
||||||
be empty if an error occurred.
|
will be empty if an error occurred.
|
||||||
This method is currently implemented only under Win32 and Linux and is useful
|
|
||||||
mostly for diagnostics purposes.
|
This method is currently implemented only under Win32 and Linux and is
|
||||||
|
useful mostly for diagnostics purposes.
|
||||||
*/
|
*/
|
||||||
static wxDynamicLibraryDetailsArray ListLoaded();
|
static wxDynamicLibraryDetailsArray ListLoaded();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Loads DLL with the given @a name into memory. The @a flags argument can
|
Loads DLL with the given @a name into memory. The @a flags argument can
|
||||||
be a combination of the following bits:
|
be a combination of the styles outlined in the class description.
|
||||||
|
|
||||||
wxDL_LAZY
|
|
||||||
|
|
||||||
equivalent of RTLD_LAZY under Unix, ignored elsewhere
|
|
||||||
|
|
||||||
wxDL_NOW
|
|
||||||
|
|
||||||
equivalent of RTLD_NOW under Unix, ignored elsewhere
|
|
||||||
|
|
||||||
wxDL_GLOBAL
|
|
||||||
|
|
||||||
equivalent of RTLD_GLOBAL under Unix, ignored elsewhere
|
|
||||||
|
|
||||||
wxDL_VERBATIM
|
|
||||||
|
|
||||||
don't try to append the appropriate extension to
|
|
||||||
the library name (this is done by default).
|
|
||||||
|
|
||||||
wxDL_DEFAULT
|
|
||||||
|
|
||||||
default flags, same as wxDL_NOW currently
|
|
||||||
|
|
||||||
wxDL_QUIET
|
|
||||||
|
|
||||||
don't log an error message if the library couldn't be
|
|
||||||
loaded.
|
|
||||||
|
|
||||||
Returns @true if the library was successfully loaded, @false otherwise.
|
Returns @true if the library was successfully loaded, @false otherwise.
|
||||||
*/
|
*/
|
||||||
bool Load(const wxString& name, int flags = wxDL_DEFAULT);
|
bool Load(const wxString& name, int flags = wxDL_DEFAULT);
|
||||||
|
|
||||||
//@{
|
|
||||||
/**
|
/**
|
||||||
Unloads the library from memory. wxDynamicLibrary object automatically calls
|
Unloads the library from memory. wxDynamicLibrary object automatically
|
||||||
this method from its destructor if it had been successfully loaded.
|
calls this method from its destructor if it had been successfully
|
||||||
The second version is only used if you need to keep the library in memory
|
loaded.
|
||||||
during a longer period of time than the scope of the wxDynamicLibrary object.
|
|
||||||
In this case you may call Detach() and store
|
|
||||||
the handle somewhere and call this static method later to unload it.
|
|
||||||
*/
|
*/
|
||||||
void Unload();
|
void Unload();
|
||||||
|
/**
|
||||||
|
Unloads the library from memory. wxDynamicLibrary object automatically
|
||||||
|
calls this method from its destructor if it had been successfully
|
||||||
|
loaded.
|
||||||
|
|
||||||
|
This version of Unload() is only used if you need to keep the library
|
||||||
|
in memory during a longer period of time than the scope of the
|
||||||
|
wxDynamicLibrary object. In this case you may call Detach() and store
|
||||||
|
the handle somewhere and call this static method later to unload it.
|
||||||
|
*/
|
||||||
static void Unload(wxDllType handle);
|
static void Unload(wxDllType handle);
|
||||||
//@}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user