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:
parent
957f865c97
commit
cb719f2e29
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
||||
|
@ -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"
|
||||
|
@ -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);
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -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;
|
||||
|
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_TYPESH__
|
||||
|
@ -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
|
||||
|
@ -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
|
||||
|
@ -50,5 +50,5 @@ void wxTaskBarIconBase::OnRightButtonDown(wxTaskBarIconEvent& WXUNUSED(event))
|
||||
delete menu;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
#endif // defined(wxHAS_TASK_BAR_ICON)
|
||||
|
@ -59,7 +59,7 @@ WX_DEFINE_LIST(wxToolBarToolsList);
|
||||
// wxToolBarToolBase
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject)
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxToolBarToolBase, wxObject)
|
||||
|
||||
bool wxToolBarToolBase::Enable(bool enable)
|
||||
{
|
||||
@ -592,7 +592,7 @@ void wxToolBarBase::OnRightClick(int id,
|
||||
}
|
||||
|
||||
// Called when the mouse cursor enters a tool bitmap (no button pressed).
|
||||
// Argument is -1 if mouse is exiting the toolbar.
|
||||
// Argument is wxID_ANY if mouse is exiting the toolbar.
|
||||
// Note that for this event, the id of the window is used,
|
||||
// and the integer parameter of wxCommandEvent is used to retrieve
|
||||
// the tool id.
|
||||
@ -605,9 +605,9 @@ void wxToolBarBase::OnMouseEnter(int id)
|
||||
wxFrame *frame = wxDynamicCast(GetParent(), wxFrame);
|
||||
if( frame )
|
||||
{
|
||||
wxToolBarToolBase* tool = id == -1 ? (wxToolBarToolBase*)0 : FindById(id);
|
||||
wxToolBarToolBase* tool = id == wxID_ANY ? (wxToolBarToolBase*)0 : FindById(id);
|
||||
wxString help = tool ? tool->GetLongHelp() : wxString();
|
||||
frame->DoGiveHelp( help, id != -1 );
|
||||
frame->DoGiveHelp( help, id != wxID_ANY );
|
||||
}
|
||||
|
||||
(void)GetEventHandler()->ProcessEvent(event);
|
||||
|
@ -143,7 +143,7 @@ wxTextBuffer::wxTextBuffer(const wxString& strBufferName)
|
||||
: m_strBufferName(strBufferName)
|
||||
{
|
||||
m_nCurLine = 0;
|
||||
m_isOpened = FALSE;
|
||||
m_isOpened = false;
|
||||
}
|
||||
|
||||
wxTextBuffer::~wxTextBuffer()
|
||||
@ -172,13 +172,13 @@ bool wxTextBuffer::Create()
|
||||
wxASSERT( !m_strBufferName.IsEmpty() );
|
||||
|
||||
// if the buffer already exists do nothing
|
||||
if ( Exists() ) return FALSE;
|
||||
|
||||
if ( Exists() ) return false;
|
||||
|
||||
if ( !OnOpen(m_strBufferName, WriteAccess) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
OnClose();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextBuffer::Open(const wxString& strBufferName, wxMBConv& conv)
|
||||
@ -195,7 +195,7 @@ bool wxTextBuffer::Open(wxMBConv& conv)
|
||||
|
||||
// open buffer in read-only mode
|
||||
if ( !OnOpen(m_strBufferName, ReadAccess) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// read buffer into memory
|
||||
m_isOpened = OnRead(conv);
|
||||
@ -275,9 +275,9 @@ bool wxTextBuffer::Close()
|
||||
m_aTypes.Clear();
|
||||
m_aLines.Clear();
|
||||
m_nCurLine = 0;
|
||||
m_isOpened = FALSE;
|
||||
m_isOpened = false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTextBuffer::Write(wxTextFileType typeNew, wxMBConv& conv)
|
||||
|
@ -128,27 +128,27 @@ wxTextAttr wxTextAttr::Combine(const wxTextAttr& attr,
|
||||
}
|
||||
|
||||
wxTextAttr newAttr(colFg, colBg, font);
|
||||
|
||||
|
||||
if (attr.HasAlignment())
|
||||
newAttr.SetAlignment(attr.GetAlignment());
|
||||
else if (attrDef.HasAlignment())
|
||||
newAttr.SetAlignment(attrDef.GetAlignment());
|
||||
|
||||
|
||||
if (attr.HasTabs())
|
||||
newAttr.SetTabs(attr.GetTabs());
|
||||
else if (attrDef.HasTabs())
|
||||
newAttr.SetTabs(attrDef.GetTabs());
|
||||
|
||||
|
||||
if (attr.HasLeftIndent())
|
||||
newAttr.SetLeftIndent(attr.GetLeftIndent(), attr.GetLeftSubIndent());
|
||||
else if (attrDef.HasLeftIndent())
|
||||
newAttr.SetLeftIndent(attrDef.GetLeftIndent(), attr.GetLeftSubIndent());
|
||||
|
||||
|
||||
if (attr.HasRightIndent())
|
||||
newAttr.SetRightIndent(attr.GetRightIndent());
|
||||
else if (attrDef.HasRightIndent())
|
||||
newAttr.SetRightIndent(attrDef.GetRightIndent());
|
||||
|
||||
newAttr.SetRightIndent(attrDef.GetRightIndent());
|
||||
|
||||
return newAttr;
|
||||
}
|
||||
|
||||
@ -171,14 +171,14 @@ bool wxTextCtrlBase::SetStyle(long WXUNUSED(start), long WXUNUSED(end),
|
||||
const wxTextAttr& WXUNUSED(style))
|
||||
{
|
||||
// to be implemented in derived TextCtrl classes
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// get the styling at the given position
|
||||
bool wxTextCtrlBase::GetStyle(long WXUNUSED(position), wxTextAttr& WXUNUSED(style))
|
||||
{
|
||||
// to be implemented in derived TextCtrl classes
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// change default text attributes
|
||||
@ -192,7 +192,7 @@ bool wxTextCtrlBase::SetDefaultStyle(const wxTextAttr& style)
|
||||
else
|
||||
m_defaultStyle = wxTextAttr::Combine(style, m_defaultStyle, this);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// get default text attributes
|
||||
@ -220,14 +220,14 @@ bool wxTextCtrlBase::LoadFile(const wxString& filename)
|
||||
|
||||
m_filename = filename;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
wxLogError(_("File couldn't be loaded."));
|
||||
#endif // wxUSE_FFILE
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool wxTextCtrlBase::SaveFile(const wxString& filename)
|
||||
@ -238,7 +238,7 @@ bool wxTextCtrlBase::SaveFile(const wxString& filename)
|
||||
// what kind of message to give? is it an error or a program bug?
|
||||
wxLogDebug(wxT("Can't save textctrl to file without filename."));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
#if wxUSE_FFILE
|
||||
@ -251,13 +251,13 @@ bool wxTextCtrlBase::SaveFile(const wxString& filename)
|
||||
// if it worked, save for future calls
|
||||
m_filename = filenameToUse;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
#endif // wxUSE_FFILE
|
||||
|
||||
wxLogError(_("The text couldn't be saved."));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -355,7 +355,7 @@ bool wxTextCtrlBase::CanPaste() const
|
||||
// the generic version is unused in wxMSW
|
||||
bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& WXUNUSED(event))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#else // !__WIN32__
|
||||
bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
|
||||
@ -443,10 +443,10 @@ bool wxTextCtrlBase::EmulateKeyPress(const wxKeyEvent& event)
|
||||
{
|
||||
WriteText(ch);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
#endif // !__WIN32__
|
||||
|
||||
@ -483,12 +483,12 @@ void wxTextCtrlBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
if ( event.GetSetEnabled() )
|
||||
Enable(event.GetEnabled());
|
||||
|
||||
|
||||
if ( event.GetSetText() )
|
||||
{
|
||||
if ( event.GetText() != GetValue() )
|
||||
SetValue(event.GetText());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
|
@ -102,25 +102,25 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
||||
strPtr = strBuf = new char[1024];
|
||||
strEnd = strBuf + 1024;
|
||||
|
||||
do
|
||||
do
|
||||
{
|
||||
nRead = m_file.Read(buf, WXSIZEOF(buf));
|
||||
if ( nRead == wxInvalidOffset )
|
||||
if ( nRead == wxInvalidOffset )
|
||||
{
|
||||
// read error (error message already given in wxFile::Read)
|
||||
delete[] strBuf;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
for (n = 0; n < nRead; n++)
|
||||
{
|
||||
ch = buf[n];
|
||||
switch ( ch )
|
||||
switch ( ch )
|
||||
{
|
||||
case '\n':
|
||||
// Dos/Unix line termination
|
||||
*strPtr = '\0';
|
||||
AddLine(wxString(strBuf, conv),
|
||||
AddLine(wxString(strBuf, conv),
|
||||
chLast == '\r' ? wxTextFileType_Dos
|
||||
: wxTextFileType_Unix);
|
||||
strPtr = strBuf;
|
||||
@ -128,7 +128,7 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
||||
break;
|
||||
|
||||
case '\r':
|
||||
if ( chLast == '\r' )
|
||||
if ( chLast == '\r' )
|
||||
{
|
||||
// Mac empty line
|
||||
AddLine(wxEmptyString, wxTextFileType_Mac);
|
||||
@ -147,7 +147,7 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
||||
strPtr = strBuf;
|
||||
*(strPtr++) = ch;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
// add to the current line
|
||||
*(strPtr++) = ch;
|
||||
@ -168,15 +168,15 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
||||
} while ( nRead == WXSIZEOF(buf) );
|
||||
|
||||
// anything in the last line?
|
||||
if ( strPtr != strBuf )
|
||||
if ( strPtr != strBuf )
|
||||
{
|
||||
*strPtr = '\0';
|
||||
AddLine(wxString(strBuf, conv),
|
||||
AddLine(wxString(strBuf, conv),
|
||||
wxTextFileType_None); // no line terminator
|
||||
}
|
||||
|
||||
delete[] strBuf;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@ -194,7 +194,7 @@ bool wxTextFile::OnWrite(wxTextFileType typeNew, wxMBConv& conv)
|
||||
|
||||
if ( !fileTmp.IsOpened() ) {
|
||||
wxLogError(_("can't write buffer '%s' to disk."), m_strBufferName.c_str());
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
size_t nCount = GetLineCount();
|
||||
|
@ -85,7 +85,7 @@ bool wxTimerBase::Start(int milliseconds, bool oneShot)
|
||||
|
||||
m_oneShot = oneShot;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TIMER
|
||||
|
@ -102,11 +102,11 @@ void wxStringTokenizer::Reinit(const wxString& str)
|
||||
// do we have more of them?
|
||||
bool wxStringTokenizer::HasMoreTokens() const
|
||||
{
|
||||
wxCHECK_MSG( IsOk(), FALSE, _T("you should call SetString() first") );
|
||||
wxCHECK_MSG( IsOk(), false, _T("you should call SetString() first") );
|
||||
|
||||
if ( m_string.find_first_not_of(m_delims) == wxString::npos )
|
||||
{
|
||||
// no non empty tokens left, but in 2 cases we still may return TRUE if
|
||||
// no non empty tokens left, but in 2 cases we still may return true if
|
||||
// GetNextToken() wasn't called yet for this empty token:
|
||||
//
|
||||
// a) in wxTOKEN_RET_EMPTY_ALL mode we always do it
|
||||
@ -115,13 +115,13 @@ bool wxStringTokenizer::HasMoreTokens() const
|
||||
// token just before it
|
||||
return (m_mode == wxTOKEN_RET_EMPTY_ALL) ||
|
||||
(m_mode == wxTOKEN_RET_EMPTY && m_pos == 0)
|
||||
? m_hasMore : FALSE;
|
||||
? m_hasMore : false;
|
||||
}
|
||||
else
|
||||
{
|
||||
// there are non delimiter characters left, hence we do have more
|
||||
// tokens
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
||||
@ -181,7 +181,7 @@ wxString wxStringTokenizer::GetNextToken()
|
||||
|
||||
// no more tokens in this string, even in wxTOKEN_RET_EMPTY_ALL
|
||||
// mode (we will return the trailing one right now in this case)
|
||||
m_hasMore = FALSE;
|
||||
m_hasMore = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
@ -67,7 +67,7 @@ wxTopLevelWindowBase::~wxTopLevelWindowBase()
|
||||
bool shouldExit = IsLastBeforeExit();
|
||||
|
||||
wxTopLevelWindows.DeleteObject(this);
|
||||
|
||||
|
||||
if ( shouldExit )
|
||||
{
|
||||
// then do it
|
||||
@ -88,12 +88,12 @@ bool wxTopLevelWindowBase::Destroy()
|
||||
// not be done if this TLW is the
|
||||
// only one left since we then would
|
||||
// risk not to get any idle events
|
||||
// at all anymore during which we
|
||||
// at all anymore during which we
|
||||
// could delete any pending events.
|
||||
Hide();
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxTopLevelWindowBase::IsLastBeforeExit() const
|
||||
@ -116,10 +116,10 @@ wxSize wxTopLevelWindowBase::GetMaxSize() const
|
||||
|
||||
wxClientDisplayRect( 0, 0, &w, &h );
|
||||
|
||||
if( size.GetWidth() == -1 )
|
||||
if( size.GetWidth() == wxDefaultCoord )
|
||||
size.SetWidth( w );
|
||||
|
||||
if( size.GetHeight() == -1 )
|
||||
if( size.GetHeight() == wxDefaultCoord )
|
||||
size.SetHeight( h );
|
||||
|
||||
return size;
|
||||
@ -257,7 +257,7 @@ void wxTopLevelWindowBase::DoUpdateWindowUI(wxUpdateUIEvent& event)
|
||||
{
|
||||
if ( event.GetSetEnabled() )
|
||||
Enable(event.GetEnabled());
|
||||
|
||||
|
||||
if ( event.GetSetText() )
|
||||
{
|
||||
if ( event.GetText() != GetTitle() )
|
||||
|
@ -75,7 +75,7 @@ wxTreeEvent::wxTreeEvent(wxEventType commandType, int id)
|
||||
: wxNotifyEvent(commandType, id)
|
||||
{
|
||||
m_itemOld = 0l;
|
||||
m_editCancelled = FALSE;
|
||||
m_editCancelled = false;
|
||||
}
|
||||
|
||||
#endif // wxUSE_TREECTRL
|
||||
|
@ -70,14 +70,14 @@ wxChar wxTextInputStream::NextChar()
|
||||
#if wxUSE_UNICODE
|
||||
wxChar wbuf[2];
|
||||
memset((void*)m_lastBytes, 0, 10);
|
||||
for(size_t inlen = 0; inlen < 9; inlen++)
|
||||
for(size_t inlen = 0; inlen < 9; inlen++)
|
||||
{
|
||||
// actually read the next character
|
||||
m_lastBytes[inlen] = m_input.GetC();
|
||||
|
||||
if(m_input.LastRead() <= 0)
|
||||
if(m_input.LastRead() <= 0)
|
||||
return wxEOT;
|
||||
|
||||
|
||||
int retlen = (int) m_conv.MB2WC(wbuf, m_lastBytes, 2); // returns -1 for failure
|
||||
if(retlen >= 0) // res == 0 could happen for '\0' char
|
||||
return wbuf[0];
|
||||
@ -86,13 +86,13 @@ wxChar wxTextInputStream::NextChar()
|
||||
return wxEOT;
|
||||
#else
|
||||
m_lastBytes[0] = m_input.GetC();
|
||||
|
||||
if(m_input.LastRead() <= 0)
|
||||
|
||||
if(m_input.LastRead() <= 0)
|
||||
return wxEOT;
|
||||
|
||||
|
||||
return m_lastBytes[0];
|
||||
#endif
|
||||
|
||||
|
||||
}
|
||||
|
||||
wxChar wxTextInputStream::NextNonSeparators()
|
||||
@ -112,18 +112,18 @@ wxChar wxTextInputStream::NextNonSeparators()
|
||||
|
||||
bool wxTextInputStream::EatEOL(const wxChar &c)
|
||||
{
|
||||
if (c == wxT('\n')) return TRUE; // eat on UNIX
|
||||
if (c == wxT('\n')) return true; // eat on UNIX
|
||||
|
||||
if (c == wxT('\r')) // eat on both Mac and DOS
|
||||
{
|
||||
wxChar c2 = NextChar();
|
||||
if(c2 == wxEOT) return TRUE; // end of stream reached, had enough :-)
|
||||
if(c2 == wxEOT) return true; // end of stream reached, had enough :-)
|
||||
|
||||
if (c2 != wxT('\n')) UngetLast(); // Don't eat on Mac
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxUint32 wxTextInputStream::Read32(int base)
|
||||
@ -191,7 +191,7 @@ wxString wxTextInputStream::ReadLine()
|
||||
wxChar c = NextChar();
|
||||
if(c == wxEOT)
|
||||
break;
|
||||
|
||||
|
||||
if ( !m_input )
|
||||
break;
|
||||
|
||||
@ -216,13 +216,13 @@ wxString wxTextInputStream::ReadWord()
|
||||
return word;
|
||||
|
||||
word += c;
|
||||
|
||||
|
||||
while ( !m_input.Eof() )
|
||||
{
|
||||
c = NextChar();
|
||||
if(c == wxEOT)
|
||||
break;
|
||||
|
||||
|
||||
if (m_separators.Contains(c))
|
||||
break;
|
||||
|
||||
@ -421,7 +421,7 @@ wxTextOutputStream& wxTextOutputStream::operator<<(const wxString& string)
|
||||
wxTextOutputStream& wxTextOutputStream::operator<<(char c)
|
||||
{
|
||||
WriteString( wxString::FromAscii(c) );
|
||||
|
||||
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -107,21 +107,21 @@ typedef voidp unzFile;
|
||||
/* tm_unz contain date/time info */
|
||||
typedef struct tm_unz_s
|
||||
{
|
||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||
uInt tm_mday; /* day of the month - [1,31] */
|
||||
uInt tm_mon; /* months since January - [0,11] */
|
||||
uInt tm_year; /* years - [1980..2044] */
|
||||
uInt tm_sec; /* seconds after the minute - [0,59] */
|
||||
uInt tm_min; /* minutes after the hour - [0,59] */
|
||||
uInt tm_hour; /* hours since midnight - [0,23] */
|
||||
uInt tm_mday; /* day of the month - [1,31] */
|
||||
uInt tm_mon; /* months since January - [0,11] */
|
||||
uInt tm_year; /* years - [1980..2044] */
|
||||
} tm_unz;
|
||||
|
||||
/* unz_global_info structure contain global data about the ZIPfile
|
||||
These data comes from the end of central dir */
|
||||
typedef struct unz_global_info_s
|
||||
{
|
||||
uLong number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
uLong size_comment; /* size of the global comment of the zipfile */
|
||||
uLong number_entry; /* total number of entries in
|
||||
the central dir on this disk */
|
||||
uLong size_comment; /* size of the global comment of the zipfile */
|
||||
} unz_global_info;
|
||||
|
||||
|
||||
@ -148,15 +148,16 @@ typedef struct unz_file_info_s
|
||||
} unz_file_info;
|
||||
|
||||
extern int ZEXPORT unzStringFileNameCompare OF ((const char* fileName1,
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity));
|
||||
const char* fileName2,
|
||||
int iCaseSensitivity));
|
||||
/*
|
||||
Compare two filename (fileName1,fileName2).
|
||||
If iCaseSenisivity = 1, comparision is case sensitivity (like strcmp)
|
||||
If iCaseSenisivity = 2, comparision is not case sensitivity (like strcmpi
|
||||
or strcasecmp)
|
||||
If iCaseSenisivity = 1, comparision is case sensitivity
|
||||
(like strcmp)
|
||||
If iCaseSenisivity = 2, comparision is not case sensitivity
|
||||
(like strcmpi or strcasecmp)
|
||||
If iCaseSenisivity = 0, case sensitivity is defaut of your operating system
|
||||
(like 1 on Unix, 2 on Windows)
|
||||
(like 1 on Unix, 2 on Windows)
|
||||
*/
|
||||
|
||||
|
||||
@ -164,11 +165,11 @@ extern unzFile ZEXPORT unzOpen OF((const char *path));
|
||||
/*
|
||||
Open a Zip file. path contain the full pathname (by example,
|
||||
on a Windows NT computer "c:\\zlib\\zlib111.zip" or on an Unix computer
|
||||
"zlib/zlib111.zip".
|
||||
If the zipfile cannot be opened (file don't exist or in not valid), the
|
||||
return value is NULL.
|
||||
"zlib/zlib111.zip".
|
||||
If the zipfile cannot be opened (file don't exist or in not valid), the
|
||||
return value is NULL.
|
||||
Else, the return value is a unzFile Handle, usable with other function
|
||||
of this unzip package.
|
||||
of this unzip package.
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzClose OF((unzFile file));
|
||||
@ -179,7 +180,7 @@ extern int ZEXPORT unzClose OF((unzFile file));
|
||||
return UNZ_OK if there is no problem. */
|
||||
|
||||
extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
|
||||
unz_global_info *pglobal_info));
|
||||
unz_global_info *pglobal_info));
|
||||
/*
|
||||
Write info about the ZipFile in the *pglobal_info structure.
|
||||
No preparation of the structure is needed
|
||||
@ -187,8 +188,8 @@ extern int ZEXPORT unzGetGlobalInfo OF((unzFile file,
|
||||
|
||||
|
||||
extern int ZEXPORT unzGetGlobalComment OF((unzFile file,
|
||||
char *szComment,
|
||||
uLong uSizeBuf));
|
||||
char *szComment,
|
||||
uLong uSizeBuf));
|
||||
/*
|
||||
Get the global comment string of the ZipFile, in the szComment buffer.
|
||||
uSizeBuf is the size of the szComment buffer.
|
||||
@ -213,8 +214,8 @@ extern int ZEXPORT unzGoToNextFile OF((unzFile file));
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||
const char *szFileName,
|
||||
int iCaseSensitivity));
|
||||
const char *szFileName,
|
||||
int iCaseSensitivity));
|
||||
/*
|
||||
Try locate the file szFileName in the zipfile.
|
||||
For the iCaseSensitivity signification, see unzStringFileNameCompare
|
||||
@ -226,24 +227,24 @@ extern int ZEXPORT unzLocateFile OF((unzFile file,
|
||||
|
||||
|
||||
extern int ZEXPORT unzGetCurrentFileInfo OF((unzFile file,
|
||||
unz_file_info *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize));
|
||||
unz_file_info *pfile_info,
|
||||
char *szFileName,
|
||||
uLong fileNameBufferSize,
|
||||
void *extraField,
|
||||
uLong extraFieldBufferSize,
|
||||
char *szComment,
|
||||
uLong commentBufferSize));
|
||||
/*
|
||||
Get Info about the current file
|
||||
if pfile_info!=NULL, the *pfile_info structure will contain somes info about
|
||||
the current file
|
||||
the current file
|
||||
if szFileName!=NULL, the filemane string will be copied in szFileName
|
||||
(fileNameBufferSize is the size of the buffer)
|
||||
(fileNameBufferSize is the size of the buffer)
|
||||
if extraField!=NULL, the extra field information will be copied in extraField
|
||||
(extraFieldBufferSize is the size of the buffer).
|
||||
This is the Central-header version of the extra field
|
||||
(extraFieldBufferSize is the size of the buffer).
|
||||
This is the Central-header version of the extra field
|
||||
if szComment!=NULL, the comment string of the file will be copied in szComment
|
||||
(commentBufferSize is the size of the buffer)
|
||||
(commentBufferSize is the size of the buffer)
|
||||
*/
|
||||
|
||||
/***************************************************************************/
|
||||
@ -263,10 +264,10 @@ extern int ZEXPORT unzCloseCurrentFile OF((unzFile file));
|
||||
Return UNZ_CRCERROR if all the file was read but the CRC is not good
|
||||
*/
|
||||
|
||||
|
||||
|
||||
extern int ZEXPORT unzReadCurrentFile OF((unzFile file,
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
/*
|
||||
Read bytes from the current file (opened by unzOpenCurrentFile)
|
||||
buf contain buffer where data must be copied
|
||||
@ -289,8 +290,8 @@ extern int ZEXPORT unzeof OF((unzFile file));
|
||||
*/
|
||||
|
||||
extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
voidp buf,
|
||||
unsigned len));
|
||||
/*
|
||||
Read extra field from the current file (opened by unzOpenCurrentFile)
|
||||
This is the local-header version of the extra field (sometimes, there is
|
||||
@ -299,9 +300,9 @@ extern int ZEXPORT unzGetLocalExtrafield OF((unzFile file,
|
||||
if buf==NULL, it return the size of the local extra field
|
||||
|
||||
if buf!=NULL, len is the size of the buffer, the extra header is copied in
|
||||
buf.
|
||||
buf.
|
||||
the return value is the number of bytes copied in buf, or (if <0)
|
||||
the error code
|
||||
the error code
|
||||
*/
|
||||
|
||||
#if defined(__VISAGECPP__) || defined(__BORLANDC__)
|
||||
|
@ -45,7 +45,7 @@ USE_PROTOCOL(wxHTTP)
|
||||
USE_PROTOCOL(wxFTP)
|
||||
|
||||
wxHTTP *wxURL::ms_proxyDefault = NULL;
|
||||
bool wxURL::ms_useDefaultProxy = FALSE;
|
||||
bool wxURL::ms_useDefaultProxy = false;
|
||||
#endif
|
||||
|
||||
// --------------------------------------------------------------
|
||||
@ -73,7 +73,7 @@ wxURL::wxURL(const wxString& url)
|
||||
if ( !ms_proxyDefault )
|
||||
{
|
||||
// don't try again
|
||||
ms_useDefaultProxy = FALSE;
|
||||
ms_useDefaultProxy = false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -98,14 +98,14 @@ bool wxURL::ParseURL()
|
||||
if (!PrepProto(last_url))
|
||||
{
|
||||
m_error = wxURL_SNTXERR;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Find and create the protocol object
|
||||
if (!FetchProtocol())
|
||||
{
|
||||
m_error = wxURL_NOPROTO;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// Do we need a host name ?
|
||||
@ -115,7 +115,7 @@ bool wxURL::ParseURL()
|
||||
if (!PrepHost(last_url))
|
||||
{
|
||||
m_error = wxURL_SNTXERR;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@ -123,7 +123,7 @@ bool wxURL::ParseURL()
|
||||
if (!PrepPath(last_url))
|
||||
{
|
||||
m_error = wxURL_NOPATH;
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// URL parse finished.
|
||||
@ -147,7 +147,7 @@ bool wxURL::ParseURL()
|
||||
#endif
|
||||
|
||||
m_error = wxURL_NOERR;
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxURL::CleanData()
|
||||
@ -180,14 +180,14 @@ bool wxURL::PrepProto(wxString& url)
|
||||
|
||||
// Find end
|
||||
pos = url.Find(wxT(':'));
|
||||
if (pos == -1)
|
||||
return FALSE;
|
||||
if (pos == wxNOT_FOUND)
|
||||
return false;
|
||||
|
||||
m_protoname = url(0, pos);
|
||||
|
||||
url = url(pos+1, url.Length());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxURL::PrepHost(wxString& url)
|
||||
@ -196,51 +196,51 @@ bool wxURL::PrepHost(wxString& url)
|
||||
int pos, pos2;
|
||||
|
||||
if ((url.GetChar(0) != wxT('/')) || (url.GetChar(1) != wxT('/')))
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
url = url(2, url.Length());
|
||||
|
||||
pos = url.Find(wxT('/'));
|
||||
if (pos == -1)
|
||||
if (pos == wxNOT_FOUND)
|
||||
pos = url.Length();
|
||||
|
||||
if (pos == 0)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
temp_url = url(0, pos);
|
||||
url = url(url.Find(wxT('/')), url.Length());
|
||||
|
||||
// Retrieve service number
|
||||
pos2 = temp_url.Find(wxT(':'), TRUE);
|
||||
if (pos2 != -1 && pos2 < pos)
|
||||
pos2 = temp_url.Find(wxT(':'), true);
|
||||
if (pos2 != wxNOT_FOUND && pos2 < pos)
|
||||
{
|
||||
m_servname = temp_url(pos2+1, pos);
|
||||
if (!m_servname.IsNumber())
|
||||
return FALSE;
|
||||
return false;
|
||||
temp_url = temp_url(0, pos2);
|
||||
}
|
||||
|
||||
// Retrieve user and password.
|
||||
pos2 = temp_url.Find(wxT('@'));
|
||||
// Even if pos2 equals -1, this code is right.
|
||||
// Even if pos2 equals wxNOT_FOUND, this code is right.
|
||||
m_hostname = temp_url(pos2+1, temp_url.Length());
|
||||
|
||||
m_user = wxT("");
|
||||
m_password = wxT("");
|
||||
|
||||
if (pos2 == -1)
|
||||
return TRUE;
|
||||
if (pos2 == wxNOT_FOUND)
|
||||
return true;
|
||||
|
||||
temp_url = temp_url(0, pos2);
|
||||
pos2 = temp_url.Find(wxT(':'));
|
||||
|
||||
if (pos2 == -1)
|
||||
return FALSE;
|
||||
if (pos2 == wxNOT_FOUND)
|
||||
return false;
|
||||
|
||||
m_user = temp_url(0, pos2);
|
||||
m_password = temp_url(pos2+1, url.Length());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxURL::PrepPath(wxString& url)
|
||||
@ -249,7 +249,7 @@ bool wxURL::PrepPath(wxString& url)
|
||||
m_path = ConvertToValidURI(url);
|
||||
else
|
||||
m_path = wxT("/");
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxURL::FetchProtocol()
|
||||
@ -265,11 +265,11 @@ bool wxURL::FetchProtocol()
|
||||
|
||||
m_protoinfo = info;
|
||||
m_protocol = (wxProtocol *)m_protoinfo->m_cinfo->CreateObject();
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
info = info->next;
|
||||
}
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// --------------------------------------------------------------
|
||||
@ -318,7 +318,7 @@ wxInputStream *wxURL::GetInputStream()
|
||||
|
||||
addr.Service(m_servname);
|
||||
|
||||
if (!m_protocol->Connect(addr, TRUE)) // Watcom needs the 2nd arg for some reason
|
||||
if (!m_protocol->Connect(addr, true)) // Watcom needs the 2nd arg for some reason
|
||||
{
|
||||
m_error = wxURL_CONNERR;
|
||||
return NULL;
|
||||
@ -327,7 +327,7 @@ wxInputStream *wxURL::GetInputStream()
|
||||
#endif
|
||||
|
||||
// When we use a proxy, we have to pass the whole URL to it.
|
||||
wxInputStream *the_i_stream =
|
||||
wxInputStream *the_i_stream =
|
||||
(m_useProxy) ? m_protocol->GetInputStream(m_url) :
|
||||
m_protocol->GetInputStream(m_path);
|
||||
|
||||
@ -356,7 +356,7 @@ void wxURL::SetDefaultProxy(const wxString& url_proxy)
|
||||
{
|
||||
wxString tmp_str = url_proxy;
|
||||
int pos = tmp_str.Find(wxT(':'));
|
||||
if (pos == -1)
|
||||
if (pos == wxNOT_FOUND)
|
||||
return;
|
||||
|
||||
wxString hostname = tmp_str(0, pos),
|
||||
@ -373,7 +373,7 @@ void wxURL::SetDefaultProxy(const wxString& url_proxy)
|
||||
ms_proxyDefault->Close();
|
||||
else
|
||||
ms_proxyDefault = new wxHTTP();
|
||||
ms_proxyDefault->Connect(addr, TRUE); // Watcom needs the 2nd arg for some reason
|
||||
ms_proxyDefault->Connect(addr, true); // Watcom needs the 2nd arg for some reason
|
||||
}
|
||||
}
|
||||
|
||||
@ -387,7 +387,7 @@ void wxURL::SetProxy(const wxString& url_proxy)
|
||||
delete m_proxy;
|
||||
}
|
||||
|
||||
m_useProxy = FALSE;
|
||||
m_useProxy = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -399,7 +399,7 @@ void wxURL::SetProxy(const wxString& url_proxy)
|
||||
tmp_str = url_proxy;
|
||||
pos = tmp_str.Find(wxT(':'));
|
||||
// This is an invalid proxy name.
|
||||
if (pos == -1)
|
||||
if (pos == wxNOT_FOUND)
|
||||
return;
|
||||
|
||||
hostname = tmp_str(0, pos);
|
||||
@ -412,11 +412,11 @@ void wxURL::SetProxy(const wxString& url_proxy)
|
||||
if (m_proxy && m_proxy != ms_proxyDefault)
|
||||
delete m_proxy;
|
||||
m_proxy = new wxHTTP();
|
||||
m_proxy->Connect(addr, TRUE); // Watcom needs the 2nd arg for some reason
|
||||
m_proxy->Connect(addr, true); // Watcom needs the 2nd arg for some reason
|
||||
|
||||
CleanData();
|
||||
// Reparse url.
|
||||
m_useProxy = TRUE;
|
||||
m_useProxy = true;
|
||||
ParseURL();
|
||||
}
|
||||
}
|
||||
@ -441,7 +441,7 @@ wxString wxURL::ConvertToValidURI(const wxString& uri, const wxChar* delims)
|
||||
else
|
||||
{
|
||||
// GRG, Apr/2000: modified according to the URI definition (RFC 2396)
|
||||
//
|
||||
//
|
||||
// - Alphanumeric characters are never escaped
|
||||
// - Unreserved marks are never escaped
|
||||
// - Delimiters must be escaped if they appear within a component
|
||||
@ -530,10 +530,10 @@ bool wxURLModule::OnInit()
|
||||
|
||||
if ( getenv("HTTP_PROXY") )
|
||||
{
|
||||
wxURL::ms_useDefaultProxy = TRUE;
|
||||
wxURL::ms_useDefaultProxy = true;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxURLModule::OnExit()
|
||||
|
@ -322,12 +322,12 @@ bool wxGetEmailAddress(wxChar *address, int maxSize)
|
||||
{
|
||||
wxString email = wxGetEmailAddress();
|
||||
if ( !email )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
wxStrncpy(address, email, maxSize - 1);
|
||||
address[maxSize - 1] = wxT('\0');
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxString wxGetEmailAddress()
|
||||
@ -335,10 +335,10 @@ wxString wxGetEmailAddress()
|
||||
wxString email;
|
||||
|
||||
wxString host = wxGetFullHostName();
|
||||
if ( !!host )
|
||||
if ( !host.IsEmpty() )
|
||||
{
|
||||
wxString user = wxGetUserId();
|
||||
if ( !!user )
|
||||
if ( !user.IsEmpty() )
|
||||
{
|
||||
email << user << wxT('@') << host;
|
||||
}
|
||||
@ -447,18 +447,18 @@ wxString wxGetCurrentDir()
|
||||
|
||||
// wxDoExecuteWithCapture() helper: reads an entire stream into one array
|
||||
//
|
||||
// returns TRUE if ok, FALSE if error
|
||||
// returns true if ok, false if error
|
||||
#if wxUSE_STREAMS
|
||||
static bool ReadAll(wxInputStream *is, wxArrayString& output)
|
||||
{
|
||||
wxCHECK_MSG( is, FALSE, _T("NULL stream in wxExecute()?") );
|
||||
wxCHECK_MSG( is, false, _T("NULL stream in wxExecute()?") );
|
||||
|
||||
// the stream could be already at EOF or in wxSTREAM_BROKEN_PIPE state
|
||||
is->Reset();
|
||||
|
||||
wxTextInputStream tis(*is);
|
||||
|
||||
bool cont = TRUE;
|
||||
bool cont = true;
|
||||
while ( cont )
|
||||
{
|
||||
wxString line = tis.ReadLine();
|
||||
@ -467,7 +467,7 @@ static bool ReadAll(wxInputStream *is, wxArrayString& output)
|
||||
|
||||
if ( !*is )
|
||||
{
|
||||
cont = FALSE;
|
||||
cont = false;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -538,7 +538,7 @@ bool wxYield()
|
||||
|
||||
bool wxYieldIfNeeded()
|
||||
{
|
||||
return wxTheApp && wxTheApp->Yield(TRUE);
|
||||
return wxTheApp && wxTheApp->Yield(true);
|
||||
}
|
||||
|
||||
#endif // wxUSE_BASE
|
||||
@ -660,7 +660,7 @@ wxFindWindowByName (const wxString& name, wxWindow * parent)
|
||||
return wxWindow::FindWindowByName( name, parent );
|
||||
}
|
||||
|
||||
// Returns menu item id or -1 if none.
|
||||
// Returns menu item id or wxNOT_FOUND if none.
|
||||
int
|
||||
wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& itemString)
|
||||
{
|
||||
@ -670,7 +670,7 @@ wxFindMenuItemId (wxFrame * frame, const wxString& menuString, const wxString& i
|
||||
return menuBar->FindMenuItem (menuString, itemString);
|
||||
#endif // wxUSE_MENUS
|
||||
|
||||
return -1;
|
||||
return wxNOT_FOUND;
|
||||
}
|
||||
|
||||
// Try to find the deepest child that contains 'pt'.
|
||||
@ -831,7 +831,7 @@ wxString wxGetPasswordFromUser(const wxString& message,
|
||||
wxColour wxGetColourFromUser(wxWindow *parent, const wxColour& colInit)
|
||||
{
|
||||
wxColourData data;
|
||||
data.SetChooseFull(TRUE);
|
||||
data.SetChooseFull(true);
|
||||
if ( colInit.Ok() )
|
||||
{
|
||||
data.SetColour((wxColour &)colInit); // const_cast
|
||||
@ -951,7 +951,7 @@ bool wxSafeYield(wxWindow *win, bool onlyIfNeeded)
|
||||
#ifndef __WXGTK__
|
||||
bool wxSetDetectableAutoRepeat( bool WXUNUSED(flag) )
|
||||
{
|
||||
return TRUE; // detectable auto-repeat is the only mode MSW supports
|
||||
return true; // detectable auto-repeat is the only mode MSW supports
|
||||
}
|
||||
#endif // !wxGTK
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user