Source cleaning: whitespaces, tabs, -1/wxID_ANY/wxNOT_FOUND/wxDefaultCoord, TRUE/true, FALSE/false, !!/!IsEmpty().

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29285 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2004-09-23 18:20:56 +00:00
parent 957f865c97
commit cb719f2e29
29 changed files with 694 additions and 693 deletions

View File

@@ -17,7 +17,7 @@ class WXDLLIMPEXP_ADV wxTaskBarIconBase : public wxEvtHandler
{
public:
wxTaskBarIconBase() { }
// Operations:
virtual bool SetIcon(const wxIcon& icon,
const wxString& tooltip = wxEmptyString) = 0;
@@ -27,11 +27,11 @@ public:
protected:
// creates menu to be displayed when user clicks on the icon
virtual wxMenu *CreatePopupMenu() { return NULL; }
private:
// default events handling, calls CreatePopupMenu:
void OnRightButtonDown(wxTaskBarIconEvent& event);
DECLARE_EVENT_TABLE()
DECLARE_NO_COPY_CLASS(wxTaskBarIconBase)
};
@@ -57,7 +57,7 @@ class WXDLLIMPEXP_ADV wxTaskBarIconEvent : public wxEvent
{
public:
wxTaskBarIconEvent(wxEventType evtType, wxTaskBarIcon *tbIcon)
: wxEvent(-1, evtType)
: wxEvent(wxID_ANY, evtType)
{
SetEventObject(tbIcon);
}
@@ -80,13 +80,13 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_ADV,wxEVT_TASKBAR_RIGHT_DCLICK,1556)
END_DECLARE_EVENT_TYPES()
#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_MOVE(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_MOVE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DOWN, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_UP, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_DOWN(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DOWN, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_UP(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_UP, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_LEFT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_LEFT_DCLICK, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#define EVT_TASKBAR_RIGHT_DCLICK(fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_TASKBAR_RIGHT_DCLICK, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTaskBarIconEventFunction, &fn ), NULL),
#endif
// wxHAS_TASK_BAR_ICON

View File

@@ -50,7 +50,7 @@ enum wxToolBarToolStyle
// ----------------------------------------------------------------------------
// wxToolBarTool is a toolbar element.
//
// It has a unique id (except for the separators which always have id -1), the
// It has a unique id (except for the separators which always have id wxID_ANY), the
// style (telling whether it is a normal button, separator or a control), the
// state (toggled or not, enabled or not) and short and long help strings. The
// default implementations use the short help string for the tooltip text which
@@ -88,8 +88,8 @@ public:
m_kind = kind;
m_enabled = TRUE;
m_toggled = FALSE;
m_enabled = true;
m_toggled = false;
m_toolStyle = toolid == wxID_SEPARATOR ? wxTOOL_STYLE_SEPARATOR
: wxTOOL_STYLE_BUTTON;
@@ -103,8 +103,8 @@ public:
m_kind = wxITEM_MAX; // invalid value
m_enabled = TRUE;
m_toggled = FALSE;
m_enabled = true;
m_toggled = false;
m_toolStyle = wxTOOL_STYLE_CONTROL;
}
@@ -168,7 +168,7 @@ public:
}
}
// modifiers: return TRUE if the state really changed
// modifiers: return true if the state really changed
bool Enable(bool enable);
bool Toggle(bool toggle);
bool SetToggle(bool toggle);
@@ -329,14 +329,14 @@ public:
virtual wxToolBarToolBase *AddTool (wxToolBarToolBase *tool);
virtual wxToolBarToolBase *InsertTool (size_t pos, wxToolBarToolBase *tool);
// add an arbitrary control to the toolbar, return TRUE if ok (notice that
// add an arbitrary control to the toolbar (notice that
// the control will be deleted by the toolbar and that it will also adjust
// its position/size)
//
// NB: the control should have toolbar as its parent
virtual wxToolBarToolBase *AddControl(wxControl *control);
virtual wxToolBarToolBase *InsertControl(size_t pos, wxControl *control);
// get the control with the given id or return NULL
virtual wxControl *FindControl( int toolid );
@@ -375,7 +375,7 @@ public:
// returns tool pos, or wxNOT_FOUND if tool isn't found
virtual int GetToolPos(int id) const;
// return TRUE if the tool is toggled
// return true if the tool is toggled
virtual bool GetToolState(int toolid) const;
virtual bool GetToolEnabled(int toolid) const;
@@ -432,7 +432,7 @@ public:
// find the tool by id
wxToolBarToolBase *FindById(int toolid) const;
// return TRUE if this is a vertical toolbar, otherwise FALSE
// return true if this is a vertical toolbar, otherwise false
bool IsVertical() const { return HasFlag(wxTB_VERTICAL); }
@@ -443,7 +443,7 @@ public:
wxToolBarToolBase *AddTool(int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled,
bool toggle = FALSE,
bool toggle = false,
wxObject *clientData = NULL,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
@@ -469,7 +469,7 @@ public:
const wxBitmap& bmpDisabled,
bool toggle,
wxCoord xPos,
wxCoord yPos = -1,
wxCoord yPos = wxDefaultCoord,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
@@ -483,7 +483,7 @@ public:
int toolid,
const wxBitmap& bitmap,
const wxBitmap& bmpDisabled = wxNullBitmap,
bool toggle = FALSE,
bool toggle = false,
wxObject *clientData = NULL,
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString)
@@ -498,14 +498,14 @@ public:
// NB: these functions are deprecated, use EVT_TOOL_XXX() instead!
// Only allow toggle if returns TRUE. Call when left button up.
// Only allow toggle if returns true. Call when left button up.
virtual bool OnLeftClick(int toolid, bool toggleDown);
// Call when right button down.
virtual void OnRightClick(int toolid, long x, long y);
// Called when the mouse cursor enters a tool bitmap.
// Argument is -1 if mouse is exiting the toolbar.
// Argument is wxID_ANY if mouse is exiting the toolbar.
virtual void OnMouseEnter(int toolid);
// more deprecated functions
@@ -523,7 +523,7 @@ public:
virtual void UpdateWindowUI(long flags = wxUPDATE_UI_NONE) ;
// don't want toolbars to accept the focus
virtual bool AcceptsFocus() const { return FALSE; }
virtual bool AcceptsFocus() const { return false; }
protected:
// to implement in derived classes
@@ -541,8 +541,8 @@ protected:
const wxString& shortHelp = wxEmptyString,
const wxString& longHelp = wxEmptyString,
wxObject *clientData = NULL,
wxCoord xPos = -1,
wxCoord yPos = -1
wxCoord xPos = wxDefaultCoord,
wxCoord yPos = wxDefaultCoord
);
// the tool is not yet inserted into m_tools list when this function is

View File

@@ -145,15 +145,15 @@ public:
size_t n,
wxTextFileType type = typeDefault)
{
m_aLines.insert(m_aLines.begin() + n, str);
m_aTypes.insert(m_aTypes.begin()+n, type);
m_aLines.insert(m_aLines.begin() + n, str);
m_aTypes.insert(m_aTypes.begin()+n, type);
}
// delete one line
void RemoveLine(size_t n)
{
m_aLines.erase(m_aLines.begin() + n);
m_aTypes.erase(m_aTypes.begin() + n);
m_aTypes.erase(m_aTypes.begin() + n);
}
// remove all lines

View File

@@ -233,7 +233,7 @@ private:
wxTextAttrAlignment m_textAlignment;
wxArrayInt m_tabs; // array of int: tab stops in 1/10 mm
int m_leftIndent; // left indent in 1/10 mm
int m_leftSubIndent; // left indent for all but the first
int m_leftSubIndent; // left indent for all but the first
// line in a paragraph relative to the
// first line, in 1/10 mm
int m_rightIndent; // right indent in 1/10 mm
@@ -307,7 +307,7 @@ public:
virtual void AppendText(const wxString& text) = 0;
// insert the character which would have resulted from this key event,
// return TRUE if anything has been inserted
// return true if anything has been inserted
virtual bool EmulateKeyPress(const wxKeyEvent& event);
// text control under some platforms supports the text styles: these
@@ -466,10 +466,10 @@ public:
typedef void (wxEvtHandler::*wxTextUrlEventFunction)(wxTextUrlEvent&);
#define EVT_TEXT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_UPDATED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_ENTER, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_URL(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_URL, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxTextUrlEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_MAXLEN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_MAXLEN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_UPDATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_ENTER(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_ENTER, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_URL(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_URL, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxTextUrlEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TEXT_MAXLEN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TEXT_MAXLEN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#ifndef NO_TEXT_WINDOW_STREAM

View File

@@ -24,7 +24,7 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, 19)
END_DECLARE_EVENT_TYPES()
#define EVT_TOGGLEBUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TOGGLEBUTTON(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TOGGLEBUTTON_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCommandEventFunction, & fn ), (wxObject *) NULL ),
#if defined(__WXMSW__)
#include "wx/msw/tglbtn.h"

View File

@@ -321,7 +321,7 @@ public:
bool IsOk() const;
// NB: the associated mutex MUST be locked beforehand by the calling thread
//
//
// it atomically releases the lock on the associated mutex
// and starts waiting to be woken up by a Signal()/Broadcast()
// once its signaled, then it will wait until it can reacquire
@@ -332,7 +332,7 @@ public:
// timeout ellapses even if the condition hasn't been signalled: in this
// case, the return value is false, otherwise (i.e. in case of a normal
// return) it is true
//
//
// the timeeout parameter specifies a interval that needs to be waited in
// milliseconds
wxCondError WaitTimeout(unsigned long milliseconds);

View File

@@ -33,10 +33,10 @@
// more readable flags for Start():
// generate notifications periodically until the timer is stopped (default)
#define wxTIMER_CONTINUOUS FALSE
#define wxTIMER_CONTINUOUS false
// only send the notification once and then stop the timer
#define wxTIMER_ONE_SHOT TRUE
#define wxTIMER_ONE_SHOT true
// the interface of wxTimer class
class WXDLLEXPORT wxTimerBase : public wxEvtHandler
@@ -52,11 +52,11 @@ public:
// ctor which allows to avoid having to override Notify() in the derived
// class: the owner will get timer notifications which can be handled with
// EVT_TIMER
wxTimerBase(wxEvtHandler *owner, int timerid = -1)
wxTimerBase(wxEvtHandler *owner, int timerid = wxID_ANY)
{ Init(); SetOwner(owner, timerid); }
// same as ctor above
void SetOwner(wxEvtHandler *owner, int timerid = -1)
void SetOwner(wxEvtHandler *owner, int timerid = wxID_ANY)
{ m_owner = owner; m_idTimer = timerid; }
wxEvtHandler* GetOwner() const { return m_owner; }
@@ -70,7 +70,7 @@ public:
//
// it is now valid to call Start() multiple times: this just restarts the
// timer if it is already running
virtual bool Start(int milliseconds = -1, bool oneShot = FALSE);
virtual bool Start(int milliseconds = -1, bool oneShot = false);
// stop the timer
virtual void Stop() = 0;
@@ -82,28 +82,28 @@ public:
// getting info
// ------------
// return TRUE if the timer is running
// return true if the timer is running
virtual bool IsRunning() const = 0;
// get the (last) timer interval in the milliseconds
int GetInterval() const { return m_milli; }
// return TRUE if the timer is one shot
// return true if the timer is one shot
bool IsOneShot() const { return m_oneShot; }
// return the timer ID
int GetId() const { return m_idTimer; }
protected:
// common part of all ctors
void Init() { m_oneShot = FALSE; m_milli = 0; }
void Init() { m_oneShot = false; m_milli = 0; }
wxEvtHandler *m_owner;
int m_idTimer;
int m_milli; // the timer interval
bool m_oneShot; // TRUE if one shot
bool m_oneShot; // true if one shot
DECLARE_NO_COPY_CLASS(wxTimerBase)
};
@@ -134,13 +134,13 @@ class WXDLLEXPORT wxTimerRunner
{
public:
wxTimerRunner(wxTimer& timer) : m_timer(timer) { }
wxTimerRunner(wxTimer& timer, int milli, bool oneShot = FALSE)
wxTimerRunner(wxTimer& timer, int milli, bool oneShot = false)
: m_timer(timer)
{
m_timer.Start(milli, oneShot);
}
void Start(int milli, bool oneShot = FALSE)
void Start(int milli, bool oneShot = false)
{
m_timer.Start(milli, oneShot);
}
@@ -188,7 +188,7 @@ private:
typedef void (wxEvtHandler::*wxTimerEventFunction)(wxTimerEvent&);
#define EVT_TIMER(timerid, func) \
DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTimerEventFunction, & func ), NULL),
DECLARE_EVENT_TABLE_ENTRY( wxEVT_TIMER, timerid, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTimerEventFunction, & func ), NULL),
#endif // wxUSE_GUI && wxUSE_TIMER

View File

@@ -43,14 +43,14 @@ public:
// get the current tip and update the internal state to return the next tip
// when called for the next time
virtual wxString GetTip() = 0;
virtual wxString GetTip() = 0;
// get the current tip "index" (or whatever allows the tip provider to know
// from where to start the next time)
size_t GetCurrentTip() const { return m_currentTip; }
// Allows any user-derived class to optionally override this function to
// modify the tip as soon as it is read. If return wxEmptyString, then
// Allows any user-derived class to optionally override this function to
// modify the tip as soon as it is read. If return wxEmptyString, then
// the tip is skipped, and the next one is read.
virtual wxString PreprocessTip(const wxString& tip) { return tip; }
@@ -78,10 +78,10 @@ WXDLLIMPEXP_ADV wxTipProvider *wxCreateFileTipProvider(const wxString& filename,
// the user to disable this (however, it's the program which should show, or
// not, the dialog on startup depending on its value, not this class).
//
// The function returns TRUE if this checkbox is checked, FALSE otherwise.
// The function returns true if this checkbox is checked, false otherwise.
WXDLLIMPEXP_ADV bool wxShowTip(wxWindow *parent,
wxTipProvider *tipProvider,
bool showAtStartup = TRUE);
bool showAtStartup = true);
#endif // wxUSE_STARTUP_TIPS

View File

@@ -79,7 +79,7 @@ enum
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString)
{
return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, FALSE, -1, -1, NULL,
return wxToolBarSimple::AddTool(toolid, bitmap, wxNullBitmap, false, wxDefaultCoord, wxDefaultCoord, NULL,
shortHelpString, longHelpString);
}
@@ -95,7 +95,7 @@ enum
const wxString& longHelpString = wxEmptyString
)
{
return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, -1, -1, clientData,
return wxToolBarSimple::AddTool(toolid, bitmap, pushedBitmap, toggle, wxDefaultCoord, wxDefaultCoord, clientData,
shortHelpString, longHelpString);
}
@@ -107,7 +107,7 @@ enum
const wxBitmap& pushedBitmap,
bool toggle,
wxCoord xPos,
wxCoord yPos = -1,
wxCoord yPos = wxDefaultCoord,
wxObject *clientData = NULL,
const wxString& shortHelpString = wxEmptyString,
const wxString& longHelpString = wxEmptyString

View File

@@ -66,13 +66,13 @@ class WXDLLEXPORT wxTopLevelWindowBase;
// "close" but round instead of squared and just hides the applications
// instead of closing it) in the title bar
#if defined(__WXWINCE__)
#if defined(__SMARTPHONE__)
#define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE)
#if defined(__SMARTPHONE__)
#define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE)
#elif defined(__WINCE_STANDARDSDK__)
#define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE|wxCLOSE_BOX)
#else
#define wxDEFAULT_FRAME_STYLE (0)
#endif
#define wxDEFAULT_FRAME_STYLE (wxMAXIMIZE|wxCLOSE_BOX)
#else
#define wxDEFAULT_FRAME_STYLE (0)
#endif
#else // !__WXWINCE__
#define wxDEFAULT_FRAME_STYLE \
(wxSYSTEM_MENU | \
@@ -125,19 +125,19 @@ public:
// top level wnd state
// --------------------
// maximize = TRUE => maximize, otherwise - restore
virtual void Maximize(bool maximize = TRUE) = 0;
// maximize = true => maximize, otherwise - restore
virtual void Maximize(bool maximize = true) = 0;
// undo Maximize() or Iconize()
virtual void Restore() = 0;
// iconize = TRUE => iconize, otherwise - restore
virtual void Iconize(bool iconize = TRUE) = 0;
// iconize = true => iconize, otherwise - restore
virtual void Iconize(bool iconize = true) = 0;
// return TRUE if the frame is maximized
// return true if the frame is maximized
virtual bool IsMaximized() const = 0;
// return TRUE if the frame is iconized
// return true if the frame is iconized
virtual bool IsIconized() const = 0;
// get the frame icon
@@ -155,7 +155,7 @@ public:
// maximize the window to cover entire screen
virtual bool ShowFullScreen(bool show, long style = wxFULLSCREEN_ALL) = 0;
// return TRUE if the frame is in fullscreen mode
// return true if the frame is in fullscreen mode
virtual bool IsFullScreen() const = 0;
/*
@@ -167,9 +167,9 @@ public:
*/
// Set the shape of the window to the given region.
// Returns TRUE if the platform supports this feature (and the
// Returns true if the platform supports this feature (and the
// operation is successful.)
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return FALSE; }
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return false; }
// Attracts the users attention to this window if the application is
// inactive (should be called when a background event occurs)
@@ -181,7 +181,7 @@ public:
// override some base class virtuals
virtual bool Destroy();
virtual bool IsTopLevel() const { return TRUE; }
virtual bool IsTopLevel() const { return true; }
virtual wxSize GetMaxSize() const;
// event handlers
@@ -204,21 +204,21 @@ protected:
// test whether this window makes part of the frame
// (menubar, toolbar and statusbar are excluded from automatic layout)
virtual bool IsOneOfBars(const wxWindow *WXUNUSED(win)) const
{ return FALSE; }
{ return false; }
// check if we should exit the program after deleting this top level
// window (this is used in common dtor and wxMSW code)
bool IsLastBeforeExit() const;
// send the iconize event, return TRUE if processed
bool SendIconizeEvent(bool iconized = TRUE);
// send the iconize event, return true if processed
bool SendIconizeEvent(bool iconized = true);
// Get the default size for the new window if no explicit size given. If
// there are better default sizes then these can be changed, just as long
// as they are not too small for TLWs (and not larger than screen).
static wxSize GetDefaultSize();
static int WidthDefault(int w) { return w == -1 ? GetDefaultSize().x : w; }
static int HeightDefault(int h) { return h == -1 ? GetDefaultSize().y : h; }
static int WidthDefault(int w) { return w == wxDefaultCoord ? GetDefaultSize().x : w; }
static int HeightDefault(int h) { return h == wxDefaultCoord ? GetDefaultSize().y : h; }
// the frame icon
wxIconBundle m_icons;

View File

@@ -330,57 +330,57 @@ END_DECLARE_EVENT_TYPES()
//
// if you call event.Allow(), the drag operation will start and a
// EVT_TREE_END_DRAG event will be sent when the drag is over.
#define EVT_TREE_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_BEGIN_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_BEGIN_RDRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_RDRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
// GetItem() is the item on which the drop occured (if any) and GetPoint() the
// current mouse coords
#define EVT_TREE_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_DRAG, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_END_DRAG(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_DRAG, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
// GetItem() returns the itme whose label is being edited, GetLabel() returns
// the current item label for BEGIN and the would be new one for END.
//
// Vetoing BEGIN event means that label editing won't happen at all,
// vetoing END means that the new value is discarded and the old one kept
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_BEGIN_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_BEGIN_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_END_LABEL_EDIT(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_END_LABEL_EDIT, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
// provide/update information about GetItem() item
#define EVT_TREE_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_GET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SET_INFO, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_GET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_GET_INFO, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_SET_INFO(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SET_INFO, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
// GetItem() is the item being expanded/collapsed, the "ING" versions can use
#define EVT_TREE_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_EXPANDING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_ITEM_EXPANDED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_EXPANDING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_EXPANDING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_COLLAPSING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_COLLAPSING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetOldItem() is the item which had the selection previously, GetItem() is
// the item which acquires selection
#define EVT_TREE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGING, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_SEL_CHANGING(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_SEL_CHANGING, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetKeyCode() returns the key code
// NB: this is the only message for which GetItem() is invalid (you may get the
// item from GetSelection())
#define EVT_TREE_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_KEY_DOWN, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_KEY_DOWN(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_KEY_DOWN, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetItem() returns the item being deleted, the associated data (if any) will
// be deleted just after the return of this event handler (if any)
#define EVT_TREE_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_DELETE_ITEM, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_DELETE_ITEM(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_DELETE_ITEM, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
// GetItem() returns the item that was activated (double click, enter, space)
#define EVT_TREE_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_ITEM_ACTIVATED(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_ACTIVATED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetItem() returns the item that was clicked on
#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_ITEM_RIGHT_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_RIGHT_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_ITEM_MIDDLE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_MIDDLE_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetItem() returns the item whose state image was clicked on
#define EVT_TREE_STATE_IMAGE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
#define EVT_TREE_STATE_IMAGE_CLICK(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_STATE_IMAGE_CLICK, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), NULL ),
// GetItem() is the item for which the tooltip is being requested
#define EVT_TREE_ITEM_GETTOOLTIP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, id, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#define EVT_TREE_ITEM_GETTOOLTIP(id, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_COMMAND_TREE_ITEM_GETTOOLTIP, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxTreeEventFunction, & fn ), (wxObject *) NULL ),
#endif // wxUSE_TREECTRL

View File

@@ -6,7 +6,7 @@
// Created: 28/06/1998
// RCS-ID: $Id$
// Copyright: (c) Guilhem Lavaux
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TXTSTREAM_H_
@@ -32,7 +32,7 @@ WXDLLIMPEXP_BASE wxTextOutputStream &endl( wxTextOutputStream &stream );
#define wxEOT wxT('\4') // the End-Of-Text control code (used only inside wxTextInputStream)
// If you're scanning through a file using wxTextInputStream, you should check for EOF _before_
// reading the next item (word / number), because otherwise the last item may get lost.
// reading the next item (word / number), because otherwise the last item may get lost.
// You should however be prepared to receive an empty item (empty string / zero number) at the
// end of file, especially on Windows systems. This is unavoidable because most (but not all) files end
// with whitespace (i.e. usually a newline).
@@ -77,7 +77,7 @@ protected:
wxInputStream &m_input;
wxString m_separators;
char m_lastBytes[10]; // stores the bytes that were read for the last character
#if wxUSE_UNICODE
wxMBConv &m_conv;
#endif
@@ -136,7 +136,7 @@ public:
protected:
wxOutputStream &m_output;
wxEOL m_mode;
#if wxUSE_UNICODE
wxMBConv &m_conv;
#endif

View File

@@ -6,7 +6,7 @@
// Created: 01/02/97
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
#ifndef _WX_TYPESH__

View File

@@ -87,7 +87,7 @@ protected:
friend class wxURLNativeImp;
// pointer to a native URL implementation object
wxURLNativeImp *m_nativeImp;
// Creates on the heap and returns a native
// Creates on the heap and returns a native
// implementation object for the current platform.
static wxURLNativeImp *CreateNativeImpObject();
#endif

View File

@@ -18,7 +18,7 @@
#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA) && !defined(__EMX__)
// Some older compilers (such as EMX) cannot handle
// #pragma interface/implementation correctly, iff
// #pragma interface/implementation correctly, iff
// #pragma implementation is used in _two_ translation
// units (as created by e.g. event.cpp compiled for
// libwx_base and event.cpp compiled for libwx_gui_core).
@@ -272,17 +272,17 @@ WXDLLIMPEXP_BASE unsigned long wxGetProcessId();
WXDLLIMPEXP_BASE long wxGetFreeMemory();
// should wxApp::OnFatalException() be called?
WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = TRUE);
WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true);
// ----------------------------------------------------------------------------
// Environment variables
// ----------------------------------------------------------------------------
// returns TRUE if variable exists (value may be NULL if you just want to check
// returns true if variable exists (value may be NULL if you just want to check
// for this)
WXDLLIMPEXP_BASE bool wxGetEnv(const wxString& var, wxString *value);
// set the env var name to the given value, return TRUE on success
// set the env var name to the given value, return true on success
WXDLLIMPEXP_BASE bool wxSetEnv(const wxString& var, const wxChar *value);
// remove the env var from environment
@@ -349,7 +349,7 @@ WXDLLEXPORT wxAcceleratorEntry *wxGetAccelFromString(const wxString& label);
// Window search
// ----------------------------------------------------------------------------
// Returns menu item id or -1 if none.
// Returns menu item id or wxNOT_FOUND if none.
WXDLLEXPORT int wxFindMenuItemId(wxFrame *frame, const wxString& menuString, const wxString& itemString);
// Find the wxWindow at the given point. wxGenericFindWindowAtPoint
@@ -374,10 +374,10 @@ WXDLLEXPORT wxWindow* wxFindWindowByName(const wxString& name, wxWindow *parent
// ----------------------------------------------------------------------------
// Yield to other apps/messages and disable user input
WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = FALSE);
WXDLLEXPORT bool wxSafeYield(wxWindow *win = NULL, bool onlyIfNeeded = false);
// Enable or disable input to all top level windows
WXDLLEXPORT void wxEnableTopLevelWindows(bool enable = TRUE);
WXDLLEXPORT void wxEnableTopLevelWindows(bool enable = true);
// Check whether this window wants to process messages, e.g. Stop button
// in long calculations.
@@ -412,7 +412,7 @@ WXDLLEXPORT void wxBeginBusyCursor(wxCursor *cursor = wxHOURGLASS_CURSOR);
// Restore cursor to normal
WXDLLEXPORT void wxEndBusyCursor();
// TRUE if we're between the above two calls
// true if we're between the above two calls
WXDLLEXPORT bool wxIsBusy();
// Convenience class so we can just create a wxBusyCursor object on the stack