Fix some typos, no code changes (besides strings)

This commit is contained in:
Dimitri Schoolwerth
2015-06-05 02:54:02 +04:00
parent 8d9a9e286b
commit 31145b8e3a
38 changed files with 72 additions and 72 deletions

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: minimal.cpp
// Purpose: Minimal wxWindows sample
// Purpose: Minimal wxWidgets sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
@@ -24,7 +24,7 @@
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
@@ -95,7 +95,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
wxEND_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// Create a new application object: this macro will allow wxWidgets to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also implements the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
@@ -114,7 +114,7 @@ wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
// create the main application window
MyFrame *frame = new MyFrame(wxT("Minimal wxWindows App"));
MyFrame *frame = new MyFrame(wxT("Minimal wxWidgets App"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
@@ -158,7 +158,7 @@ MyFrame::MyFrame(const wxString& title)
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(wxT("Welcome to wxWindows!"));
SetStatusText(wxT("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
}

View File

@@ -1,6 +1,6 @@
/////////////////////////////////////////////////////////////////////////////
// Name: minimal.cpp
// Purpose: Minimal wxWindows sample
// Purpose: Minimal wxWidgets sample
// Author: Julian Smart
// Modified by:
// Created: 04/01/98
@@ -24,7 +24,7 @@
#endif
// for all others, include the necessary headers (this file is usually all you
// need because it includes almost all "standard" wxWindows headers)
// need because it includes almost all "standard" wxWidgets headers)
#ifndef WX_PRECOMP
#include "wx/wx.h"
#endif
@@ -95,7 +95,7 @@ wxBEGIN_EVENT_TABLE(MyFrame, wxFrame)
EVT_MENU(Minimal_About, MyFrame::OnAbout)
wxEND_EVENT_TABLE()
// Create a new application object: this macro will allow wxWindows to create
// Create a new application object: this macro will allow wxWidgets to create
// the application object during program execution (it's better than using a
// static object for many reasons) and also implements the accessor function
// wxGetApp() which will return the reference of the right type (i.e. MyApp and
@@ -114,7 +114,7 @@ wxIMPLEMENT_APP(MyApp);
bool MyApp::OnInit()
{
// create the main application window
MyFrame *frame = new MyFrame(wxT("Minimal wxWindows App"));
MyFrame *frame = new MyFrame(wxT("Minimal wxWidgets App"));
// and show it (the frames, unlike simple controls, are not shown when
// created initially)
@@ -158,7 +158,7 @@ MyFrame::MyFrame(const wxString& title)
#if wxUSE_STATUSBAR
// create a status bar just for fun (by default with 1 pane only)
CreateStatusBar(2);
SetStatusText(wxT("Welcome to wxWindows!"));
SetStatusText(wxT("Welcome to wxWidgets!"));
#endif // wxUSE_STATUSBAR
}

View File

@@ -37,7 +37,7 @@ also the section about `wxABI_VERSION`.
What kind of changes are NOT binary compatible
----------------------------------------------
If its still up, the
If it's still up, the
[KDE guide](http://techbase.kde.org/Policies/Binary_Compatibility_Issues_With_C++)
is a good reference.
@@ -45,7 +45,7 @@ is a good reference.
The changes that are NOT binary compatible:
- Adding a virtual function
- Changing the name of a any function or variable
- Changing the name of any function or variable
- Changing the signature of a virtual function (adding a parameter,
even a default one)
- Changing the order of the virtual functions in a class ("switching" them, etc.)

View File

@@ -886,7 +886,7 @@ extern wxAppInitializer wxTheAppInitializer;
// deprecated variants _not_ requiring a semicolon after them
// (note that also some wx-prefixed macro do _not_ require a semicolon because
// it's not always possible to force the compire to require it)
// it's not always possible to force the compiler to require it)
#define IMPLEMENT_WXWIN_MAIN_CONSOLE wxIMPLEMENT_WXWIN_MAIN_CONSOLE
#define IMPLEMENT_WXWIN_MAIN wxIMPLEMENT_WXWIN_MAIN

View File

@@ -4388,7 +4388,7 @@ WXDLLIMPEXP_CORE wxWindow* wxFindFocusDescendant(wxWindow* ancestor);
// deprecated variants _not_ requiring a semicolon after them and without wx prefix
// (note that also some wx-prefixed macro do _not_ require a semicolon because
// it's not always possible to force the compire to require it)
// it's not always possible to force the compiler to require it)
#define DECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj) \
wxDECLARE_EVENT_TABLE_ENTRY(type, winid, idLast, fn, obj)

View File

@@ -207,7 +207,7 @@ inline T *wxCheckCast(const void *ptr)
// ----------------------------------------------------------------------------
// deprecated variants _not_ requiring a semicolon after them and without wx prefix.
// (note that also some wx-prefixed macro do _not_ require a semicolon because
// it's not always possible to force the compire to require it)
// it's not always possible to force the compiler to require it)
#define DECLARE_CLASS_INFO_ITERATORS() wxDECLARE_CLASS_INFO_ITERATORS();
#define DECLARE_ABSTRACT_CLASS(n) wxDECLARE_ABSTRACT_CLASS(n);
@@ -457,7 +457,7 @@ inline wxObject *wxCheckDynamicCast(wxObject *obj, wxClassInfo *classInfo)
// deprecated variants _not_ requiring a semicolon after them and without wx prefix.
// (note that also some wx-prefixed macro do _not_ require a semicolon because
// it's not always possible to force the compire to require it)
// it's not always possible to force the compiler to require it)
#define IMPLEMENT_DYNAMIC_CLASS(n,b) wxIMPLEMENT_DYNAMIC_CLASS(n,b)
#define IMPLEMENT_DYNAMIC_CLASS2(n,b1,b2) wxIMPLEMENT_DYNAMIC_CLASS2(n,b1,b2)

View File

@@ -7,7 +7,7 @@
// This class delegates all method calls and events to the
// Scintilla objects and so forth. This allows the use of
// Scintilla without polluting the namespace with all the
// classes and itentifiers from Scintilla.
// classes and identifiers from Scintilla.
//
// Author: Robin Dunn
//

View File

@@ -46,7 +46,7 @@ enum wxAuiManagerOption
/// When a docked pane is resized, its content is refreshed in live (instead of moving
/// the border alone and refreshing the content at the end).
wxAUI_MGR_LIVE_RESIZE = 1 << 8,
/// Default behavior.
/// Default behaviour.
wxAUI_MGR_DEFAULT = wxAUI_MGR_ALLOW_FLOATING |
wxAUI_MGR_TRANSPARENT_HINT |
wxAUI_MGR_HINT_FADE |
@@ -144,7 +144,7 @@ enum wxAuiManagerOption
When a docked pane is resized, its content is refreshed in live (instead of moving
the border alone and refreshing the content at the end).
@style{wxAUI_MGR_DEFAULT}
Default behavior, combines: wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT |
Default behaviour, combines: wxAUI_MGR_ALLOW_FLOATING | wxAUI_MGR_TRANSPARENT_HINT |
wxAUI_MGR_HINT_FADE | wxAUI_MGR_NO_VENETIAN_BLINDS_FADE.
@endStyleTable

View File

@@ -3374,7 +3374,7 @@ public:
Process a @c wxEVT_DATAVIEW_COLUMN_SORTED event.
@event{EVT_DATAVIEW_COLUMN_REORDERED(id, func)}
Process a @c wxEVT_DATAVIEW_COLUMN_REORDERED event.
Currently this even is only generated when using the native OSX
Currently this even is only generated when using the native OS X
version.
@event{EVT_DATAVIEW_ITEM_BEGIN_DRAG(id, func)}
Process a @c wxEVT_DATAVIEW_ITEM_BEGIN_DRAG event.

View File

@@ -1578,7 +1578,7 @@ public:
context, if this wxDC has something that could be thought of in that
way. (Not all of them do.)
For example, on Windows the return value is an HDC, on OSX it is a
For example, on Windows the return value is an HDC, on OS X it is a
CGContextRef and on wxGTK it will be a GdkDrawable. If the DC is a
wxGCDC then the return value will be the value returned from
wxGraphicsContext::GetNativeContext. A value of NULL is returned if

View File

@@ -1063,7 +1063,7 @@ enum wxKeyModifier
wxMOD_META = 0x0008,
wxMOD_WIN = wxMOD_META,
/** used to describe the true Ctrl Key under OSX,
/** used to describe the true Ctrl Key under OS X,
identic to @c wxMOD_CONTROL on other platforms */
wxMOD_RAW_CONTROL,

View File

@@ -114,7 +114,7 @@ enum wxFontFlag
/// Underlined style (not underlined by default).
wxFONTFLAG_UNDERLINED = 1 << 6,
/// Strike-through style (implemented in MSW, GTK, and OSX)
/// Strike-through style (implemented in MSW, GTK, and wxOSX)
wxFONTFLAG_STRIKETHROUGH = 1 << 7,
/// the mask of all currently used flags
@@ -388,7 +388,7 @@ public:
/**
Use a strike-through version of the font.
Currently this is only implemented in wxMSW, wxGTK and OSX.
Currently this is only implemented in wxMSW, wxGTK, and wxOSX.
*/
wxFontInfo& Strikethrough(bool strikethrough = true);
@@ -790,7 +790,7 @@ public:
/**
Returns stricken-through version of this font.
Currently stricken-through fonts are only supported in wxMSW, wxGTK and OSX.
Currently stricken-through fonts are only supported in wxMSW, wxGTK, and wxOSX.
@see MakeStrikethrough()
@@ -852,7 +852,7 @@ public:
/**
Changes this font to be stricken-through.
Currently stricken-through fonts are only supported in wxMSW, wxGTK and OSX.
Currently stricken-through fonts are only supported in wxMSW, wxGTK, and wxOSX.
@see Strikethrough()
@@ -1056,7 +1056,7 @@ public:
/**
Sets strike-through attribute of the font.
Currently stricken-through fonts are only supported in wxMSW, wxGTK and OSX.
Currently stricken-through fonts are only supported in wxMSW, wxGTK, and wxOSX.
@param strikethrough
@true to add strike-through style, @false to remove it.

View File

@@ -20,7 +20,7 @@
RunScript return a value, which is a very critical feature in many web
embedding scenarios.
This class is only available on OSX.
This class is only available on OS X.
**/
class wxWebKitCtrl : public wxControl

View File

@@ -106,7 +106,7 @@ wxEventType wxEVT_POWER_RESUME;
powering off the screen and Acquire() method can be used to do this.
Notice that currently this functionality is only implemented for MSW and
OSX and on the latter only ::wxPOWER_RESOURCE_SYSTEM is supported for
OS X and on the latter only ::wxPOWER_RESOURCE_SYSTEM is supported for
versions earlier than 10.9.
If possible, use wxPowerResourceBlocker class to ensure that Release() is

View File

@@ -184,7 +184,7 @@ public:
On OS X, preferences pages named "General" and "Advanced" are commonly used
in apps and the OS provides stock icons for them that should be used.
Instead of reimplementing this behavior yourself, you can inherit from
Instead of reimplementing this behaviour yourself, you can inherit from
wxStockPreferencesPage and get correct title and icon.
Notice that this class only implements GetName() and GetLargeIcon(), you

View File

@@ -19,7 +19,7 @@
See the @ref page_samples_notebook for an example of wxSimplebook in
action.
Notice that is often convenient to use ShowNewPage() instead of the base
Notice that it is often convenient to use ShowNewPage() instead of the base
class AddPage().
There are no special styles defined for this class as it has no visual

View File

@@ -121,7 +121,7 @@
This option only has effect for Mac OS X 10.4 and higher.
If 1 activates the spell checking in wxTextCtrl.
@flag{osx.openfiledialog.always-show-types}
Per default a wxFileDialog with wxFD_OPEN does not show a types-popup on OSX but allows
Per default a wxFileDialog with wxFD_OPEN does not show a types-popup on OS X but allows
the selection of files from any of the supported types. Setting this to 1 shows a wxChoice
for selection (if there is more than one supported filetype).
@endFlagTable

View File

@@ -6,7 +6,7 @@
/////////////////////////////////////////////////////////////////////////////
/**
On OSX Cocoa the taskbar icon can be in the doc or in the status area.
On wxOSX/Cocoa the taskbar icon can be in the doc or in the status area.
This enumeration can be used to select which will be instantiated.
*/
enum wxTaskBarIconType
@@ -91,7 +91,7 @@ class wxTaskBarIcon : public wxEvtHandler
{
public:
/**
Default constructor. The iconType is only applicable on wxOSX_Cocoa.
Default constructor. The iconType is only applicable on wxOSX/Cocoa.
*/
wxTaskBarIcon(wxTaskBarIconType iconType = wxTBI_DEFAULT_TYPE);

View File

@@ -109,7 +109,7 @@ public:
Press a key.
If you are using modifiers then it needs to be paired with an identical
KeyUp or the modifiers will not be released (MSW and OSX).
KeyUp or the modifiers will not be released (MSW and OS X).
@param keycode
Key to operate on, as an integer. It is interpreted as a wxKeyCode.

View File

@@ -206,7 +206,7 @@ public:
It is designed to allow the creation of multiple backends for each port,
although currently just one is available. It differs from wxHtmlWindow in
that each backend is actually a full rendering engine, Trident on MSW and
Webkit on OSX and GTK. This allows the correct viewing complex pages with
Webkit on OS X and GTK. This allows the correct viewing of complex pages with
javascript and css.
@section descriptions Backend Descriptions
@@ -235,7 +235,7 @@ public:
@par wxWEBVIEW_WEBKIT (OSX)
The OSX WebKit backend uses Apple's
The OS X WebKit backend uses Apple's
<a href="http://developer.apple.com/library/mac/#documentation/Cocoa/Reference/WebKit/Classes/WebView_Class/Reference/Reference.html#//apple_ref/doc/uid/20001903">WebView</a>
class. This backend has full support for custom schemes and virtual file
systems.
@@ -499,21 +499,21 @@ public:
/**
Returns @true if the current selection can be copied.
@note This always returns @c true on the OSX WebKit backend.
@note This always returns @c true on the OS X WebKit backend.
*/
virtual bool CanCopy() const = 0;
/**
Returns @true if the current selection can be cut.
@note This always returns @c true on the OSX WebKit backend.
@note This always returns @c true on the OS X WebKit backend.
*/
virtual bool CanCut() const = 0;
/**
Returns @true if data can be pasted.
@note This always returns @c true on the OSX WebKit backend.
@note This always returns @c true on the OS X WebKit backend.
*/
virtual bool CanPaste() const = 0;
@@ -688,7 +688,7 @@ public:
are changed, since this will require a new search. To reset the
search, for example resetting the highlights call the function
with an empty search phrase. This always returns @c wxNOT_FOUND
on the OSX WebKit backend.
on the OS X WebKit backend.
@since 2.9.5
*/
virtual long Find(const wxString& text, wxWebViewFindFlags flags = wxWEBVIEW_FIND_DEFAULT) = 0;

View File

@@ -3530,7 +3530,7 @@ public:
@remarks Use EVT_HOTKEY(hotkeyId, fnc) in the event table to capture the
event. This function is currently only implemented under MSW
and OSX and always returns false in the other ports.
and OS X and always returns false in the other ports.
@see UnregisterHotKey()
*/

View File

@@ -18,7 +18,7 @@
\setheader{{\it CHAPTER \thechapter}}{}{}{}{}{{\it CHAPTER \thechapter}}%
\setfooter{\thepage}{}{}{}{}{\thepage}%
This is a demo document for the wxWindows 'help' sample.
This is a demo document for the wxWidgets 'help' sample.
You should process this file with Tex2RTF, for example:

View File

@@ -1414,7 +1414,7 @@ bool FormMain::RunTests( bool fullTest, bool interactive )
}
else
{
RT_MSG(wxT("All tests successfull"))
RT_MSG(wxT("All tests successful"))
retVal = true;
if ( !interactive )

View File

@@ -18,7 +18,7 @@
<object class="wxTextCtrl" name="message_textctrl">
<size>500,150</size>
<style>wxTE_MULTILINE</style>
<value>You can specify wxArtProvider icons in your XRC resources. These icons will be retrieved from the active wxArtProvider (see wxArtProvider in docs and /samples/artprov for more information on wxArtProvider).\n\nThe most common usage for this is that you want a dialog, toolbar or menu item to have the correct platform-specific icon in your interface, such as a custom "Don't show this again" checkbox message dialog that has the appropriate icon, as shown below.\n\nYou can also use it to manage your own custom bitmaps though, too--instead of having to write multiple versions of an XRC file that only differ in their bitmaps, you can instead just write one XRC file with the bitmap to be retrieved from the wxArtProvider at runtime, having your custom wxArtProvider use some code to serve out the desired bitmap based on such things as a wxConfig n entry of a desired icon set, what OS the application is running on, what size or resolution the display is, and so on.\n\nNote that your application's custom bitmaps are the only thing that will differ between OS's in order to ensure proper Look And Feel, as everything else: windows decoration, colors, fonts, widgets, etc already match perfectly since wxWindows runs natively.\n\nTo use a wxArtProvider bitmap instead of usual bitmap, in your XRC, instead of &lt;bitmap&gt;somefile.png&lt;/bitmap&gt;, use &lt;bitmap stock__id="SOME__ART__ID" client="SOME__CLIENT__ID"&gt;somefile.png&lt;/bitmap&gt;. The stock__id parameter is required for a bitmap to be read from wxArtProvider, stock__client is optional. The image filename is also optional, and is just used as a fallback in case the wxArtProvider couldn't return a bitmap for that particular stock__id (and particular stock__client if your wxArtProvider is set up to also filter stock__client).</value>
<value>You can specify wxArtProvider icons in your XRC resources. These icons will be retrieved from the active wxArtProvider (see wxArtProvider in docs and /samples/artprov for more information on wxArtProvider).\n\nThe most common usage for this is that you want a dialog, toolbar or menu item to have the correct platform-specific icon in your interface, such as a custom "Don't show this again" checkbox message dialog that has the appropriate icon, as shown below.\n\nYou can also use it to manage your own custom bitmaps though, too--instead of having to write multiple versions of an XRC file that only differ in their bitmaps, you can instead just write one XRC file with the bitmap to be retrieved from the wxArtProvider at runtime, having your custom wxArtProvider use some code to serve out the desired bitmap based on such things as a wxConfig entry of a desired icon set, what OS the application is running on, what size or resolution the display is, and so on.\n\nNote that your application's custom bitmaps are the only thing that will differ between OS's in order to ensure proper Look And Feel, as everything else: windows decoration, colors, fonts, widgets, etc already match perfectly since wxWidgets runs natively.\n\nTo use a wxArtProvider bitmap instead of usual bitmap, in your XRC, instead of &lt;bitmap&gt;somefile.png&lt;/bitmap&gt;, use &lt;bitmap stock__id="SOME__ART__ID" client="SOME__CLIENT__ID"&gt;somefile.png&lt;/bitmap&gt;. The stock__id parameter is required for a bitmap to be read from wxArtProvider, stock__client is optional. The image filename is also optional, and is just used as a fallback in case the wxArtProvider couldn't return a bitmap for that particular stock__id (and particular stock__client if your wxArtProvider is set up to also filter stock__client).</value>
</object>
</object>
<object class="sizeritem">

View File

@@ -19,7 +19,7 @@
<object class="wxTextCtrl" name="message_textctrl">
<size>500,150</size>
<style>wxTE_MULTILINE</style>
<value>You can embed your own custom classes into an XRC file. This is referred to as attaching an unknown control.\n\nThere are 3 main cases when you would want to do this:\n\n(A) Most commonly: you have derived a class from one of the main wxWidgets controls, so that it can manage its own state and look after its own events, because it is better management to have a portable class with all the code for that control in there with the class, instead of being having many event handlers for that control scattered up in its parent dialog (which is allowed, but gets messy if a control has alot of methods). For example, if you require a wxListCtrl that popups a menu when right-clicked on an item, and you want the wxListCtrl to resize its columns in response to an OnSize(), and a few more methods, it makes better sourcecode logic to package all these methods into by a standalone derived wxListCtrl class, instead of having the parent dialog manage all these events and other functions. This is what the example below shows: it does a custom behaviour of resizing its first column to appropriately fill up the width of the control on a resize event, and it pops up a context-menu in response to a left click (and shades out popup menu item appropriately if there is no item currenty selected in the listctrl).\n\n(B)You have an utterly new widget that has no equivalent in the wxWindows class heirarchy, so you thus need to embed your class to get the needed functionality.\n\n(C) You are using one of the rarely used wxWindows controls that doesn't have an XRC handler in the XRC library. However, all of the major controls: wxButton, wxTextCtrl, etc have an XRC handler, so this is pretty rare, and you could always write your own XRC handler for that control if you wanted. You can choose the "Controls example" from the XRC demo menu to see all the controls that have an XRC handler.\n\nThe typical formula for attaching an unknown control is:\n\n(1) If you are deriving your own custom class to be embedded into the XRC, describe that class with its own .cpp and .h file. In this example it is custclass.cpp and custclass.h\n\n(2)Specify an "unknown" tag in the XRC file that you want to embed it into (see the unknown tag in custclass.xrc). This will be the placeholder of the new class.\n\n(3) Load the XRC dialog as usual, but before you show the dialog to the user, construct an instance of your custom control, and then use wxXmlResource::Get()-&gt;AttachUnknownControl() to put the custom class into its "unknown" placeholder in the XRC file.\n\nThe result is what you see below, a custom class control that fits in seemlessly with the whole dialog, the same as if it was read from XRC directly. Try out resizing this dialog, and watch the listctrl column resize, and right-click to call up its popup menu. By the way, if you look at the source of this XRC dialog, you will that this dialog node has a set of style flags that includes wxRESIZE__BORDER--that is why this dialog is resizable, whereas most of the rest of the dialogs in the XRC sample that don't include this tag, are not resizable.</value>
<value>You can embed your own custom classes into an XRC file. This is referred to as attaching an unknown control.\n\nThere are 3 main cases when you would want to do this:\n\n(A) Most commonly: you have derived a class from one of the main wxWidgets controls, so that it can manage its own state and look after its own events, because it is better management to have a portable class with all the code for that control in there with the class, instead of having many event handlers for that control scattered up in its parent dialog (which is allowed, but gets messy if a control has a lot of methods). For example, if you require a wxListCtrl that popups a menu when right-clicked on an item, and you want the wxListCtrl to resize its columns in response to an OnSize(), and a few more methods, it makes better sourcecode logic to package all these methods into a standalone derived wxListCtrl class, instead of having the parent dialog manage all these events and other functions. This is what the example below shows: it does a custom behaviour of resizing its first column to appropriately fill up the width of the control on a resize event, and it pops up a context-menu in response to a left click (and shades out popup menu item appropriately if there is no item currenty selected in the listctrl).\n\n(B)You have an utterly new widget that has no equivalent in the wxWindows class hierarchy, so you thus need to embed your class to get the needed functionality.\n\n(C) You are using one of the rarely used wxWindows controls that doesn't have an XRC handler in the XRC library. However, all of the major controls: wxButton, wxTextCtrl, etc have an XRC handler, so this is pretty rare, and you could always write your own XRC handler for that control if you wanted. You can choose the "Controls example" from the XRC demo menu to see all the controls that have an XRC handler.\n\nThe typical formula for attaching an unknown control is:\n\n(1) If you are deriving your own custom class to be embedded into the XRC, describe that class with its own .cpp and .h file. In this example it is custclass.cpp and custclass.h\n\n(2)Specify an "unknown" tag in the XRC file that you want to embed it into (see the unknown tag in custclass.xrc). This will be the placeholder of the new class.\n\n(3) Load the XRC dialog as usual, but before you show the dialog to the user, construct an instance of your custom control, and then use wxXmlResource::Get()-&gt;AttachUnknownControl() to put the custom class into its "unknown" placeholder in the XRC file.\n\nThe result is what you see below, a custom class control that fits in seamlessly with the whole dialog, the same as if it was read from XRC directly. Try out resizing this dialog, and watch the listctrl column resize, and right-click to call up its popup menu. By the way, if you look at the source of this XRC dialog, you will that this dialog node has a set of style flags that includes wxRESIZE__BORDER--that is why this dialog is resizable, whereas most of the rest of the dialogs in the XRC sample that don't include this tag, are not resizable.</value>
</object>
</object>
<object class="sizeritem">

View File

@@ -18,7 +18,7 @@
<object class="wxTextCtrl" name="message_textctrl">
<size>500,150</size>
<style>wxTE_MULTILINE</style>
<value>This is a derived dialog using XRC. This type of derived dialog will likely be the heart of your project, and thus is the most important example in this demonstration.\n\nIt is recommended to open up derivdlg.cpp, derivdlg.h and derivdlg.xrc and follow along what is going on.\n\nThe steps to use a derived dialog are:\n\n(1) Derive your own dialog from wxDialog (derivdlg.cpp and derivdlg.h are an example).\n\n(2) In the source of the constructor of the derived dialog, load the XRC into the file, using the code as shown in the derivdlg.cpp\n\n(3)Add to the derived dilog's sourcecode some event handlers and other methods you want the dialog to do.\n\n(4)You can now just make an instance of the derived dialog and show it using ShowModal(), as is done in the MyFrame::OnDerivedDialogToolOrMenuCommand() method.\n\nThe remainder of this docuent will talk about how to use events with derived dialogs and XRC. There are 3 bits of an extra event functionality that this derived dialog can do, these will be described in turn:\n\n(A) Something to do when a user clicks on your custom button: This is straightforward. You name a control in the XRC file (in this example it is "my__button"). Then in the .cpp file, put an entry in the event table that will connect button clicks with that ID to a function that will be fired. The event table entry in the example is EVT__BUTTON( XRCID( "my__button" ), PreferencesDialog::OnMyButtonClicked ) This event table entry has 3 parts: The first part, EVT__BUTTON tells that you are describing a button click event. The final part, PreferencesDialog::OnMyButtonClicked() is what you want done in response to a button event. The middle part, XRCID( "my__button" ) is the restriction that only button events generated by a wxButton of that ID should trigger go on to do the function. This XRCID is the name of the wxButton in your XRC file. Now just describe, in the .h file and .cpp file, what you want your custom OnMyButtonClicked() function to do.\n\n(B) The second example is a very common requirement: that a checkbox or radiobutton disables some other control. The event table is set up the same as the "My Button" example above. However, it isn't an EVT__BUTTON event, it is an EVT__UPDATE__UI event: when the dialog does an updating of its UI (and thus fires this event) if the updating if of a control matching that XRCID, then it will do the specified function (which in this case looks at whether or not the checkbox is checked, and if it isn't checked, then disable the textctrl).\n\n(C) The last example shows how to handle the OK button. You will likely want to do something when the user presses OK, like save preferences or start some action (this example shows a simple case of just popping up a dialog and stopping a close). OK buttons are always named wxID__OK, so the XRC file should have it as wxID__OK also. The Event table has an EVT__BUTTON entry for wxID__OK (no XRCID though). Since this is a derived dialog with an event table, in response to an EVT__BUTTON event from a wxID__OK button, it will first look around in its own event table to see if there was any EVT__BUTTON entries, and since there is, it will do that one--if there wasn't it then checks out the base class's event table and sees if there was one there, and so on up the chain of inherited classes. Note that this is exactly what happens with the derived dialog's wxID__CANCEL button. You didn't put any EVT__BUTTON entries with an identifier of wxID__CANCEL, so after it scans your derived dialog's event table, it will then look at wxDialog's event table and see if there is one in that event table, and so on until it finds one. It will find a wxID__CANCEL handler, which will connect to the proper function (which causes the dialog to close).
<value>This is a derived dialog using XRC. This type of derived dialog will likely be the heart of your project, and thus is the most important example in this demonstration.\n\nIt is recommended to open up derivdlg.cpp, derivdlg.h and derivdlg.xrc and follow along what is going on.\n\nThe steps to use a derived dialog are:\n\n(1) Derive your own dialog from wxDialog (derivdlg.cpp and derivdlg.h are an example).\n\n(2) In the source of the constructor of the derived dialog, load the XRC into the file, using the code as shown in the derivdlg.cpp\n\n(3)Add to the derived dialog's sourcecode some event handlers and other methods you want the dialog to do.\n\n(4)You can now just make an instance of the derived dialog and show it using ShowModal(), as is done in the MyFrame::OnDerivedDialogToolOrMenuCommand() method.\n\nThe remainder of this document will talk about how to use events with derived dialogs and XRC. There are 3 bits of an extra event functionality that this derived dialog can do, these will be described in turn:\n\n(A) Something to do when a user clicks on your custom button: This is straightforward. You name a control in the XRC file (in this example it is "my__button"). Then in the .cpp file, put an entry in the event table that will connect button clicks with that ID to a function that will be fired. The event table entry in the example is EVT__BUTTON( XRCID( "my__button" ), PreferencesDialog::OnMyButtonClicked ) This event table entry has 3 parts: The first part, EVT__BUTTON tells that you are describing a button click event. The final part, PreferencesDialog::OnMyButtonClicked() is what you want done in response to a button event. The middle part, XRCID( "my__button" ) is the restriction that only button events generated by a wxButton of that ID should trigger go on to do the function. This XRCID is the name of the wxButton in your XRC file. Now just describe, in the .h file and .cpp file, what you want your custom OnMyButtonClicked() function to do.\n\n(B) The second example is a very common requirement: that a checkbox or radiobutton disables some other control. The event table is set up the same as the "My Button" example above. However, it isn't an EVT__BUTTON event, it is an EVT__UPDATE__UI event: when the dialog does an update of its UI (and thus fires this event) if the updating is of a control matching that XRCID, then it will do the specified function (which in this case looks at whether or not the checkbox is checked, and if it isn't checked, then disable the textctrl).\n\n(C) The last example shows how to handle the OK button. You will likely want to do something when the user presses OK, like save preferences or start some action (this example shows a simple case of just popping up a dialog and stopping a close). OK buttons are always named wxID__OK, so the XRC file should have it as wxID__OK also. The Event table has an EVT__BUTTON entry for wxID__OK (no XRCID though). Since this is a derived dialog with an event table, in response to an EVT__BUTTON event from a wxID__OK button, it will first look around in its own event table to see if there was any EVT__BUTTON entries, and since there is, it will do that one--if there wasn't it then checks out the base class's event table and sees if there was one there, and so on up the chain of inherited classes. Note that this is exactly what happens with the derived dialog's wxID__CANCEL button. You didn't put any EVT__BUTTON entries with an identifier of wxID__CANCEL, so after it scans your derived dialog's event table, it will then look at wxDialog's event table and see if there is one in that event table, and so on until it finds one. It will find a wxID__CANCEL handler, which will connect to the proper function (which causes the dialog to close).
</value>
</object>
</object>

View File

@@ -18,7 +18,7 @@
<object class="wxTextCtrl" name="message_textctrl">
<size>500,150</size>
<style>wxTE_MULTILINE</style>
<value>VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable expansion in your XRC files. The steps to do this are:\n\n(1)Enclose a variable inside a dollarsign and round brackets, like this: dollarsign(version).\n\n(2) Set the XmlResource flags to allow expansion of variables.\n\n(3)Before you use that XML resource, inform the XmlResourceHandler what you want that variable's value to be, via wxResourceHandler::Get()-&gt;SetVariable( "version", "2.4.0")\n\n Now, at runtime, the variable will be automatically replace by its value before the control is constructed.\n\nThe number in the version at the bottom of this dialog is an example of this expansion in action.\n\nThis is very handy for things like replacing the text in a wxStaticText, since it is a much simpler way to make a wxStaticText be a proper size: by creating it the proper size. This is in contrast to the alternative way of having using some static non-variable value in your XRC, having XRC construct it, then your application having code to change the text of it, then your app getting its best size, then setting the statictext's size, then laying out the dialog's sizer again, and other work.</value>
<value>VARIABLE EXPANSION ISN'T IMPLEMENTED CURRENTLY. You can use variable expansion in your XRC files. The steps to do this are:\n\n(1)Enclose a variable inside a dollarsign and round brackets, like this: dollarsign(version).\n\n(2) Set the XmlResource flags to allow expansion of variables.\n\n(3)Before you use that XML resource, inform the XmlResourceHandler what you want that variable's value to be, via wxResourceHandler::Get()-&gt;SetVariable( "version", "2.4.0")\n\n Now, at runtime, the variable will be automatically replace by its value before the control is constructed.\n\nThe number in the version at the bottom of this dialog is an example of this expansion in action.\n\nThis is very handy for things like replacing the text in a wxStaticText, since it is a much simpler way to make a wxStaticText be a proper size: by creating it at the proper size. This is in contrast to the alternative way of using some static non-variable value in your XRC, having XRC construct it, then your application having code to change the text of it, then your app getting its best size, then setting the statictext's size, then laying out the dialog's sizer again, and other work.</value>
</object>
</object>
<object class="sizeritem">

View File

@@ -520,7 +520,7 @@ void wxComboPopupWindow::OnDismiss()
{
wxComboCtrlBase* combo = (wxComboCtrlBase*) GetParent();
wxASSERT_MSG( wxDynamicCast(combo, wxComboCtrlBase),
wxT("parent might not be wxComboCtrl, but check wxIMPLEMENT_DYNAMIC_CLASS(2) macro for correctness") );
wxT("parent might not be wxComboCtrl, but check wxIMPLEMENT_DYNAMIC_CLASS2() macro for correctness") );
combo->OnPopupDismiss(true);
}

View File

@@ -1121,7 +1121,7 @@ bool wxTarOutputStream::PutNextEntry(wxTarEntry *entry)
if (m_tarstart != wxInvalidOffset)
m_datapos = m_tarstart + m_tarsize;
// types that are not allowd any data
// types that are not allowed any data
const char nodata[] = {
wxTAR_LNKTYPE, wxTAR_SYMTYPE, wxTAR_CHRTYPE, wxTAR_BLKTYPE,
wxTAR_DIRTYPE, wxTAR_FIFOTYPE, 0

View File

@@ -654,7 +654,7 @@ void wxGridCellAttrData::UpdateAttrRows( size_t pos, int numRows )
{
if (numRows > 0)
{
// If rows inserted, include row counter where necessary
// If rows inserted, increment row counter where necessary
coords.SetRow(row + numRows);
}
else if (numRows < 0)
@@ -688,15 +688,15 @@ void wxGridCellAttrData::UpdateAttrCols( size_t pos, int numCols )
{
if ( numCols > 0 )
{
// If rows inserted, include row counter where necessary
// If cols inserted, increment col counter where necessary
coords.SetCol(col + numCols);
}
else if (numCols < 0)
{
// If rows deleted ...
// If cols deleted ...
if ((size_t)col >= pos - numCols)
{
// ...either decrement row counter (if row still exists)...
// ...either decrement col counter (if col still exists)...
coords.SetCol(col + numCols);
}
else
@@ -800,12 +800,12 @@ void wxGridRowOrColAttrData::UpdateAttrRowsOrCols( size_t pos, int numRowsOrCols
{
if ( numRowsOrCols > 0 )
{
// If rows inserted, include row counter where necessary
// If rows or cols inserted, increment row/col counter where necessary
rowOrCol += numRowsOrCols;
}
else if ( numRowsOrCols < 0)
{
// If rows deleted, either decrement row counter (if row still exists)
// If rows/cols deleted, either decrement row/col counter (if row/col still exists)
if ((size_t)rowOrCol >= pos - numRowsOrCols)
rowOrCol += numRowsOrCols;
else
@@ -5186,7 +5186,7 @@ wxGrid::UpdateBlockBeingSelected(int topRow, int leftCol,
break;
case wxGridSelectRows:
// only full rows selection allowd, ensure that we do select
// only full rows selection allowed, ensure that we do select
// full rows
leftCol = 0;
rightCol = GetNumberCols() - 1;

View File

@@ -1563,6 +1563,6 @@ WXLRESULT wxScrolledT_Helper::FilterMSWWindowProc(WXUINT nMsg, WXLRESULT rc)
}
#endif // __WXMSW__
// NB: skipping wxScrolled<T> in wxRTTI information because being a templte,
// NB: skipping wxScrolled<T> in wxRTTI information because being a template,
// it doesn't and can't implement wxRTTI support
wxIMPLEMENT_DYNAMIC_CLASS(wxScrolledWindow, wxPanel);

View File

@@ -173,9 +173,9 @@ void wxTextEntry::DoSetValue(const wxString& value, int flags)
{
if (value != DoGetValue())
{
// use Remove() rather than SelectAll() to avoid unnecessary clipboard
// Use Remove() rather than SelectAll() to avoid unnecessary clipboard
// operations, and prevent triggering an apparent bug in GTK which
// causes the the subsequent WriteText() to append rather than overwrite
// causes the subsequent WriteText() to append rather than overwrite.
{
EventsSuppressor noevents(this);
Remove(0, -1);

View File

@@ -136,10 +136,10 @@ wxgtk_webview_webkit_navigation(WebKitWebView *,
{
wxString wxuri = uri;
wxSharedPtr<wxWebViewHandler> handler;
wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
wxVector<wxSharedPtr<wxWebViewHandler> > handlers = webKitCtrl->GetHandlers();
//We are not vetoed so see if we match one of the additional handlers
for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
it != hanlders.end(); ++it)
for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = handlers.begin();
it != handlers.end(); ++it)
{
if(wxuri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
{
@@ -357,11 +357,11 @@ wxgtk_webview_webkit_resource_req(WebKitWebView *,
wxString uri = webkit_network_request_get_uri(request);
wxSharedPtr<wxWebViewHandler> handler;
wxVector<wxSharedPtr<wxWebViewHandler> > hanlders = webKitCtrl->GetHandlers();
wxVector<wxSharedPtr<wxWebViewHandler> > handlers = webKitCtrl->GetHandlers();
//We are not vetoed so see if we match one of the additional handlers
for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = hanlders.begin();
it != hanlders.end(); ++it)
for(wxVector<wxSharedPtr<wxWebViewHandler> >::iterator it = handlers.begin();
it != handlers.end(); ++it)
{
if(uri.substr(0, (*it)->GetName().length()) == (*it)->GetName())
{

View File

@@ -786,7 +786,7 @@ void wxApp::WakeUpIdle()
}
// ----------------------------------------------------------------------------
// other wxApp event hanlders
// other wxApp event handlers
// ----------------------------------------------------------------------------
void wxApp::OnEndSession(wxCloseEvent& WXUNUSED(event))

View File

@@ -174,7 +174,7 @@ wxDropSource::~wxDropSource()
// Name : DoDragDrop
// Purpose : start drag and drop operation
// Returns : wxDragResult - the code of performed operation
// Params : [in] int flags: specifies if moving is allowe (or only copying)
// Params : [in] int flags: specifies if moving is allowed (or only copying)
// Notes : you must call SetData() before if you had used def ctor
wxDragResult wxDropSource::DoDragDrop(int flags)
{

View File

@@ -2164,9 +2164,9 @@ void wxTreeCtrl::SortChildren(const wxTreeItemId& item)
// rely on the fact that TreeView_SortChildren does the same thing as our
// default behaviour, i.e. sorts items alphabetically and so call it
// directly if we're not in derived class (much more efficient!)
// RN: Note that if you find you're code doesn't sort as expected this
// RN: Note that if you find your code doesn't sort as expected this
// may be why as if you don't use the wxDECLARE_CLASS/wxIMPLEMENT_CLASS
// combo for your derived wxTreeCtrl if will sort without
// combo for your derived wxTreeCtrl it will sort without
// OnCompareItems
if ( GetClassInfo() == wxCLASSINFO(wxTreeCtrl) )
{

View File

@@ -7,7 +7,7 @@
// This class delegates all method calls and events to the
// Scintilla objects and so forth. This allows the use of
// Scintilla without polluting the namespace with all the
// classes and itentifiers from Scintilla.
// classes and identifiers from Scintilla.
//
// Author: Robin Dunn
//

View File

@@ -433,7 +433,7 @@ protected:
// If there's a filespec, assume he's not
if ( watch.GetFilespec().empty() )
{
// The the only way to know the path for the first event,
// The only way to know the path for the first event,
// normally the IN_MOVED_FROM, is to retrieve the watch
// corresponding to oldinevt. This is needed for a move
// within a watch.