Fix typos in sample comments
Closes https://github.com/wxWidgets/wxWidgets/pull/2513
This commit is contained in:
committed by
Vadim Zeitlin
parent
8368914725
commit
1380b1914c
@@ -1401,7 +1401,7 @@ void MyFrame::OnNotebookPageChanging(wxAuiNotebookEvent& evt)
|
|||||||
void MyFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& evt)
|
void MyFrame::OnAllowNotebookDnD(wxAuiNotebookEvent& evt)
|
||||||
{
|
{
|
||||||
// for the purpose of this test application, explicitly
|
// for the purpose of this test application, explicitly
|
||||||
// allow all noteboko drag and drop events
|
// allow all notebook drag and drop events
|
||||||
evt.Allow();
|
evt.Allow();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -331,7 +331,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
//
|
//
|
||||||
// Utilies for item manipulation
|
// Utilities for item manipulation
|
||||||
//
|
//
|
||||||
|
|
||||||
void AddSelection( const wxString& selstr )
|
void AddSelection( const wxString& selstr )
|
||||||
|
@@ -427,7 +427,7 @@ void MyListModel::DeleteItems( const wxDataViewItemArray &items )
|
|||||||
|
|
||||||
// Sort in descending order so that the last
|
// Sort in descending order so that the last
|
||||||
// row will be deleted first. Otherwise the
|
// row will be deleted first. Otherwise the
|
||||||
// remaining indeces would all be wrong.
|
// remaining indices would all be wrong.
|
||||||
rows.Sort( my_sort_reverse );
|
rows.Sort( my_sort_reverse );
|
||||||
for (i = 0; i < rows.GetCount(); i++)
|
for (i = 0; i < rows.GetCount(); i++)
|
||||||
{
|
{
|
||||||
|
@@ -2037,7 +2037,7 @@ wxString BugsGridTable::GetTypeName(int WXUNUSED(row), int col)
|
|||||||
return wxGRID_VALUE_NUMBER;
|
return wxGRID_VALUE_NUMBER;
|
||||||
|
|
||||||
case Col_Severity:
|
case Col_Severity:
|
||||||
// fall thorugh (TODO should be a list)
|
// fall through (TODO should be a list)
|
||||||
|
|
||||||
case Col_Summary:
|
case Col_Summary:
|
||||||
return wxString::Format("%s:80", wxGRID_VALUE_STRING);
|
return wxString::Format("%s:80", wxGRID_VALUE_STRING);
|
||||||
|
@@ -321,7 +321,7 @@ MyFlexSizerFrame::MyFlexSizerFrame(wxFrame* parent)
|
|||||||
wxFlexGridSizer *sizerFlex;
|
wxFlexGridSizer *sizerFlex;
|
||||||
wxPanel* p = new wxPanel(this, wxID_ANY);
|
wxPanel* p = new wxPanel(this, wxID_ANY);
|
||||||
|
|
||||||
// consttuct the first column
|
// construct the first column
|
||||||
wxSizer *sizerCol1 = new wxBoxSizer(wxVERTICAL);
|
wxSizer *sizerCol1 = new wxBoxSizer(wxVERTICAL);
|
||||||
sizerCol1->Add(new wxStaticText(p, wxID_ANY, "Ungrowable:"), 0, wxCENTER | wxTOP, 20);
|
sizerCol1->Add(new wxStaticText(p, wxID_ANY, "Ungrowable:"), 0, wxCENTER | wxTOP, 20);
|
||||||
sizerFlex = new wxFlexGridSizer(3, 3, wxSize(5, 5));
|
sizerFlex = new wxFlexGridSizer(3, 3, wxSize(5, 5));
|
||||||
@@ -401,7 +401,7 @@ MyNotebookWithSizerDialog::MyNotebookWithSizerDialog(wxWindow *parent, const wxS
|
|||||||
wxDefaultPosition, wxDefaultSize,
|
wxDefaultPosition, wxDefaultSize,
|
||||||
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
wxDEFAULT_DIALOG_STYLE | wxRESIZE_BORDER)
|
||||||
{
|
{
|
||||||
// Begin with first hierarchy: a notebook at the top and
|
// Begin with first hierarchy: a notebook at the top
|
||||||
// and OK button at the bottom.
|
// and OK button at the bottom.
|
||||||
|
|
||||||
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
wxBoxSizer *topsizer = new wxBoxSizer( wxVERTICAL );
|
||||||
|
@@ -15,7 +15,7 @@
|
|||||||
// of the wxMediaCtrl class in wxWidgets.
|
// of the wxMediaCtrl class in wxWidgets.
|
||||||
//
|
//
|
||||||
// To use this sample, simply select Open File from the file menu,
|
// To use this sample, simply select Open File from the file menu,
|
||||||
// select the file you want to play - and MediaPlayer will play the file in a
|
// select the file you want to play - and MediaPlayer will play the file in
|
||||||
// the current notebook page, showing video if necessary.
|
// the current notebook page, showing video if necessary.
|
||||||
//
|
//
|
||||||
// You can select one of the menu options, or move the slider around
|
// You can select one of the menu options, or move the slider around
|
||||||
@@ -906,7 +906,7 @@ void wxMediaPlayerFrame::DoOpenFile(const wxString& path, bool bNewPage)
|
|||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// wxMediaPlayerFrame::DoPlayFile
|
// wxMediaPlayerFrame::DoPlayFile
|
||||||
//
|
//
|
||||||
// Pauses the file if its the currently playing file,
|
// Pauses the file if it's the currently playing file,
|
||||||
// otherwise it plays the file
|
// otherwise it plays the file
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
void wxMediaPlayerFrame::DoPlayFile(const wxString& path)
|
void wxMediaPlayerFrame::DoPlayFile(const wxString& path)
|
||||||
@@ -1499,7 +1499,7 @@ wxMediaPlayerNotebookPage::wxMediaPlayerNotebookPage(wxMediaPlayerFrame* parentF
|
|||||||
szBackend);
|
szBackend);
|
||||||
// you could change the cursor here like
|
// you could change the cursor here like
|
||||||
// m_mediactrl->SetCursor(wxCURSOR_BLANK);
|
// m_mediactrl->SetCursor(wxCURSOR_BLANK);
|
||||||
// note that this may not effect it if SetPlayerControls
|
// note that this may not affect it if SetPlayerControls
|
||||||
// is set to something else than wxMEDIACTRLPLAYERCONTROLS_NONE
|
// is set to something else than wxMEDIACTRLPLAYERCONTROLS_NONE
|
||||||
wxASSERT_MSG(bOK, "Could not create media control!");
|
wxASSERT_MSG(bOK, "Could not create media control!");
|
||||||
wxUnusedVar(bOK);
|
wxUnusedVar(bOK);
|
||||||
|
@@ -33,7 +33,7 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// ressources
|
// resources
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// the application icon
|
// the application icon
|
||||||
#ifndef wxHAS_IMAGES_IN_RESOURCES
|
#ifndef wxHAS_IMAGES_IN_RESOURCES
|
||||||
|
@@ -197,7 +197,7 @@ void TestGLCanvas::LoadSurface(const wxString& filename)
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
// we suppose to have in input a text file containing floating numbers
|
// we are supposed to have as input a text file containing floating numbers
|
||||||
// space/newline-separated... first 3 numbers are the coordinates of a
|
// space/newline-separated... first 3 numbers are the coordinates of a
|
||||||
// vertex and the following 3 are the relative vertex normal and so on...
|
// vertex and the following 3 are the relative vertex normal and so on...
|
||||||
|
|
||||||
|
@@ -11,7 +11,7 @@
|
|||||||
#define MATHSTUFF_H
|
#define MATHSTUFF_H
|
||||||
|
|
||||||
//NOTE:
|
//NOTE:
|
||||||
// glm library is great for handling matrices and vectors in a OpenGL style, see
|
// glm library is great for handling matrices and vectors in an OpenGL style, see
|
||||||
// http://glm.g-truc.net/
|
// http://glm.g-truc.net/
|
||||||
// But it's too large for this simple sample. I coded on my own the maths needed.
|
// But it's too large for this simple sample. I coded on my own the maths needed.
|
||||||
|
|
||||||
|
@@ -42,7 +42,7 @@ bool MyOnGLError(int err, const GLchar* glMsg = NULL)
|
|||||||
|
|
||||||
// We do calculations with 'doubles'. We pass 'GLFloats' to the shaders
|
// We do calculations with 'doubles'. We pass 'GLFloats' to the shaders
|
||||||
// because OGL added 'doubles' since OGL 4.0, and this sample is for 3.2
|
// because OGL added 'doubles' since OGL 4.0, and this sample is for 3.2
|
||||||
// Due to asynchronous nature of OGL, we can't not trust in the passed matrix
|
// Due to asynchronous nature of OGL, we can't trust in the passed matrix
|
||||||
// to be stored by GPU before the passing-function returns. So we don't use
|
// to be stored by GPU before the passing-function returns. So we don't use
|
||||||
// temporary storage, but dedicated matrices
|
// temporary storage, but dedicated matrices
|
||||||
void SetAsGLFloat4x4(double *matD, GLfloat *matF, int msize)
|
void SetAsGLFloat4x4(double *matD, GLfloat *matF, int msize)
|
||||||
@@ -352,7 +352,7 @@ bool myOGLShaders::AskUnifLocations()
|
|||||||
GLint glret = glGetUniformLocation(m_proId, it->name.c_str());
|
GLint glret = glGetUniformLocation(m_proId, it->name.c_str());
|
||||||
if ( glret == -1 )
|
if ( glret == -1 )
|
||||||
{
|
{
|
||||||
// Return now, this GPU program can not be used because we will
|
// Return now, this GPU program cannot be used because we will
|
||||||
// pass data to unknown/unused uniform locations
|
// pass data to unknown/unused uniform locations
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@@ -50,7 +50,7 @@
|
|||||||
|
|
||||||
I decided to keep apart all of this from wxWidgets. You won't find anything
|
I decided to keep apart all of this from wxWidgets. You won't find anything
|
||||||
related to wxWidgets in the oglstuff[.h][.cpp] files.
|
related to wxWidgets in the oglstuff[.h][.cpp] files.
|
||||||
That's why I use std::vector and std:string instead of those provided by wx.
|
That's why I use std::vector and std::string instead of those provided by wx.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
@@ -273,7 +273,7 @@ void fOGLErrHandler(int err, int glerr, const GLchar* glMsg)
|
|||||||
|
|
||||||
// Creates a 4-bytes-per-pixel, RGBA array from a wxImage.
|
// Creates a 4-bytes-per-pixel, RGBA array from a wxImage.
|
||||||
// If the image has alpha channel, it's used. If not, pixels with 'cTrans' color
|
// If the image has alpha channel, it's used. If not, pixels with 'cTrans' color
|
||||||
// get 'cAlpha' alpha; an the rest of pixels get alpha=255 (opaque).
|
// get 'cAlpha' alpha; and the rest of pixels get alpha=255 (opaque).
|
||||||
//
|
//
|
||||||
// NOTE: The returned pointer must be deleted somewhere in the app.
|
// NOTE: The returned pointer must be deleted somewhere in the app.
|
||||||
unsigned char* MyImgToArray(const wxImage& img, const wxColour& cTrans, unsigned char cAlpha)
|
unsigned char* MyImgToArray(const wxImage& img, const wxColour& cTrans, unsigned char cAlpha)
|
||||||
|
@@ -2773,7 +2773,7 @@ void FormMain::OnColourScheme( wxCommandEvent& event )
|
|||||||
void FormMain::OnCatColoursUpdateUI(wxUpdateUIEvent& WXUNUSED(event))
|
void FormMain::OnCatColoursUpdateUI(wxUpdateUIEvent& WXUNUSED(event))
|
||||||
{
|
{
|
||||||
// Prevent menu item from being checked
|
// Prevent menu item from being checked
|
||||||
// if it is selected from imroper page.
|
// if it is selected from improper page.
|
||||||
const wxPropertyGrid* pg = m_pPropGridManager->GetGrid();
|
const wxPropertyGrid* pg = m_pPropGridManager->GetGrid();
|
||||||
m_itemCatColours->SetCheckable(
|
m_itemCatColours->SetCheckable(
|
||||||
pg->GetPropertyByName("Appearance") &&
|
pg->GetPropertyByName("Appearance") &&
|
||||||
|
@@ -325,7 +325,7 @@ private:
|
|||||||
GetClientSize( &size_x, &size_y );
|
GetClientSize( &size_x, &size_y );
|
||||||
|
|
||||||
// First cell: (0,0)(100,25)
|
// First cell: (0,0)(100,25)
|
||||||
// It it on screen?
|
// Is it on screen?
|
||||||
if ((0+100-scroll_x > 0) && (0+25-scroll_y > 0) &&
|
if ((0+100-scroll_x > 0) && (0+25-scroll_y > 0) &&
|
||||||
(0-scroll_x < size_x) && (0-scroll_y < size_y))
|
(0-scroll_x < size_x) && (0-scroll_y < size_y))
|
||||||
{
|
{
|
||||||
@@ -339,7 +339,7 @@ private:
|
|||||||
|
|
||||||
|
|
||||||
// Second cell: (200,0)(100,25)
|
// Second cell: (200,0)(100,25)
|
||||||
// It it on screen?
|
// Is it on screen?
|
||||||
if ((200+100-scroll_x > 0) && (0+25-scroll_y > 0) &&
|
if ((200+100-scroll_x > 0) && (0+25-scroll_y > 0) &&
|
||||||
(200-scroll_x < size_x) && (0-scroll_y < size_y))
|
(200-scroll_x < size_x) && (0-scroll_y < size_y))
|
||||||
{
|
{
|
||||||
|
@@ -260,7 +260,7 @@ private:
|
|||||||
};
|
};
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
// an helper dialog used by MyFrame::OnStartGUIThread
|
// a helper dialog used by MyFrame::OnStartGUIThread
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
|
|
||||||
class MyImageDialog: public wxDialog
|
class MyImageDialog: public wxDialog
|
||||||
|
@@ -213,7 +213,7 @@ MyFrame::MyFrame(const wxString& title, int x, int y, int w, int h)
|
|||||||
{
|
{
|
||||||
// This reduces flicker effects - even better would be to define
|
// This reduces flicker effects - even better would be to define
|
||||||
// OnEraseBackground to do nothing. When the tree control's scrollbars are
|
// OnEraseBackground to do nothing. When the tree control's scrollbars are
|
||||||
// show or hidden, the frame is sent a background erase event.
|
// shown or hidden, the frame is sent a background erase event.
|
||||||
SetBackgroundColour(*wxWHITE);
|
SetBackgroundColour(*wxWHITE);
|
||||||
|
|
||||||
// Give it an icon
|
// Give it an icon
|
||||||
@@ -1039,7 +1039,7 @@ void MyTreeCtrl::CreateStateImageList(bool del)
|
|||||||
int width = icons[0].GetWidth(),
|
int width = icons[0].GetWidth(),
|
||||||
height = icons[0].GetHeight();
|
height = icons[0].GetHeight();
|
||||||
|
|
||||||
// Make an state image list containing small icons
|
// Make a state image list containing small icons
|
||||||
states = new wxImageList(width, height, true);
|
states = new wxImageList(width, height, true);
|
||||||
|
|
||||||
for ( size_t i = 0; i < WXSIZEOF(icons); i++ )
|
for ( size_t i = 0; i < WXSIZEOF(icons); i++ )
|
||||||
|
@@ -78,9 +78,9 @@ protected:
|
|||||||
long GetHeaderStyleFlags() const;
|
long GetHeaderStyleFlags() const;
|
||||||
// reset column style
|
// reset column style
|
||||||
void ResetColumnStyle(int col);
|
void ResetColumnStyle(int col);
|
||||||
// compose columnm style flags based on selections
|
// compose column style flags based on selections
|
||||||
int GetColumnStyleFlags(int col) const;
|
int GetColumnStyleFlags(int col) const;
|
||||||
// get columnm alignment flags based on selection
|
// get column alignment flags based on selection
|
||||||
wxAlignment GetColumnAlignmentFlag(int col) const;
|
wxAlignment GetColumnAlignmentFlag(int col) const;
|
||||||
|
|
||||||
// the control itself and the sizer it is in
|
// the control itself and the sizer it is in
|
||||||
|
@@ -149,7 +149,7 @@ public:
|
|||||||
// this is currently used only to take into account the border flags
|
// this is currently used only to take into account the border flags
|
||||||
virtual void RecreateWidget() = 0;
|
virtual void RecreateWidget() = 0;
|
||||||
|
|
||||||
// apply current atrributes to the widget(s)
|
// apply current attributes to the widget(s)
|
||||||
void SetUpWidget();
|
void SetUpWidget();
|
||||||
|
|
||||||
// the default attributes for the widget
|
// the default attributes for the widget
|
||||||
|
@@ -82,7 +82,7 @@ MyResizableListCtrl::MyResizableListCtrl( wxWindow *parent, wxWindowID id,
|
|||||||
// This listctrl needs to insert its columns in the constructor, since
|
// This listctrl needs to insert its columns in the constructor, since
|
||||||
// as soon as the listctrl is built, it is resized and grafted onto an
|
// as soon as the listctrl is built, it is resized and grafted onto an
|
||||||
// "unknown" XRC placeholder. This induces an OnSize() event, calling the
|
// "unknown" XRC placeholder. This induces an OnSize() event, calling the
|
||||||
// overrriden OnSize function for this class, which needs to have 3
|
// overridden OnSize function for this class, which needs to have 3
|
||||||
// columns to resize (else an assert on WXGTK debug build).
|
// columns to resize (else an assert on WXGTK debug build).
|
||||||
InsertColumn( RECORD_COLUMN, _("Record"), wxLIST_FORMAT_LEFT, 140);
|
InsertColumn( RECORD_COLUMN, _("Record"), wxLIST_FORMAT_LEFT, 140);
|
||||||
InsertColumn( ACTION_COLUMN, _("Action"), wxLIST_FORMAT_LEFT, 70);
|
InsertColumn( ACTION_COLUMN, _("Action"), wxLIST_FORMAT_LEFT, 70);
|
||||||
|
@@ -30,7 +30,7 @@
|
|||||||
// Remaining headers: Needed wx headers, then wx/contrib headers, then application headers
|
// Remaining headers: Needed wx headers, then wx/contrib headers, then application headers
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/xrc/xmlres.h" // XRC XML resouces
|
#include "wx/xrc/xmlres.h" // XRC XML resources
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
// Event table: connect the events to the handler functions to process them
|
// Event table: connect the events to the handler functions to process them
|
||||||
|
@@ -37,7 +37,7 @@
|
|||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
#include "wx/xrc/xmlres.h" // XRC XML resouces
|
#include "wx/xrc/xmlres.h" // XRC XML resources
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
|
|
||||||
|
@@ -102,7 +102,7 @@ bool MyApp::OnInit()
|
|||||||
|
|
||||||
// Load all of the XRC files that will be used. You can put everything
|
// Load all of the XRC files that will be used. You can put everything
|
||||||
// into one giant XRC file if you wanted, but then they become more
|
// into one giant XRC file if you wanted, but then they become more
|
||||||
// diffcult to manage, and harder to reuse in later projects.
|
// difficult to manage, and harder to reuse in later projects.
|
||||||
if ( !wxXmlResource::Get()->LoadAllFiles("rc") )
|
if ( !wxXmlResource::Get()->LoadAllFiles("rc") )
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
@@ -49,7 +49,7 @@ struct wxObjectCodeReaderCallback::wxObjectCodeReaderCallbackInternal
|
|||||||
{
|
{
|
||||||
if ( m_objectNames.find(objectID) != m_objectNames.end() )
|
if ( m_objectNames.find(objectID) != m_objectNames.end() )
|
||||||
{
|
{
|
||||||
wxLogError( _("Passing a already registered object to SetObjectName") );
|
wxLogError( _("Passing an already registered object to SetObjectName") );
|
||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
m_objectNames[objectID] = (const wxChar *)name;
|
m_objectNames[objectID] = (const wxChar *)name;
|
||||||
|
Reference in New Issue
Block a user