Source cleaning: whitespaces, tabs, TRUE/true, FALSE/false, -1/wxID_ANY/wxDefaultCoord, !!/!IsEmpty().
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -92,7 +92,7 @@ protected:
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = FALSE;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
public:
|
||||
@@ -143,7 +143,7 @@ protected:
|
||||
void Init(wxCalendarDateBorder border = wxCAL_BORDER_NONE)
|
||||
{
|
||||
m_border = border;
|
||||
m_holiday = FALSE;
|
||||
m_holiday = false;
|
||||
}
|
||||
#endif
|
||||
private:
|
||||
@@ -205,12 +205,12 @@ END_DECLARE_EVENT_TYPES()
|
||||
|
||||
typedef void (wxEvtHandler::*wxCalendarEventFunction)(wxCalendarEvent&);
|
||||
|
||||
#define EVT_CALENDAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DOUBLECLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_SEL_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_DAY(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DAY_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_MONTH(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_MONTH_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_YEAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_YEAR_CHANGED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_WEEKDAY_CLICKED, id, -1, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DOUBLECLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_SEL_CHANGED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_SEL_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_DAY(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_DAY_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_MONTH(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_MONTH_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_YEAR(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_YEAR_CHANGED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
#define EVT_CALENDAR_WEEKDAY_CLICKED(id, fn) DECLARE_EVENT_TABLE_ENTRY(wxEVT_CALENDAR_WEEKDAY_CLICKED, id, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) (wxCommandEventFunction) wxStaticCastEvent( wxCalendarEventFunction, & fn ), (wxObject *) NULL),
|
||||
|
||||
#endif // wxUSE_CALENDARCTRL
|
||||
|
||||
|
@@ -118,7 +118,7 @@ public:
|
||||
// show/hide the caret (should be called by wxWindow when needed):
|
||||
// Show() must be called as many times as Hide() + 1 to make the caret
|
||||
// visible
|
||||
virtual void Show(bool show = TRUE)
|
||||
virtual void Show(bool show = true)
|
||||
{
|
||||
if ( show )
|
||||
{
|
||||
@@ -131,7 +131,7 @@ public:
|
||||
DoHide();
|
||||
}
|
||||
}
|
||||
virtual void Hide() { Show(FALSE); }
|
||||
virtual void Hide() { Show(false); }
|
||||
|
||||
// blink time is measured in milliseconds and is the time elapsed
|
||||
// between 2 inversions of the caret (blink time of the caret is common
|
||||
@@ -156,7 +156,7 @@ protected:
|
||||
m_width = width;
|
||||
m_height = height;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
// pure virtuals to implement in the derived class
|
||||
@@ -212,11 +212,11 @@ public:
|
||||
wxCaretSuspend(wxWindow *win)
|
||||
{
|
||||
m_caret = win->GetCaret();
|
||||
m_show = FALSE;
|
||||
m_show = false;
|
||||
if ( m_caret && m_caret->IsVisible() )
|
||||
{
|
||||
m_caret->Hide();
|
||||
m_show = TRUE;
|
||||
m_show = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -27,7 +27,7 @@ public:
|
||||
|
||||
// check list box specific methods
|
||||
virtual bool IsChecked(size_t item) const = 0;
|
||||
virtual void Check(size_t item, bool check = TRUE) = 0;
|
||||
virtual void Check(size_t item, bool check = true) = 0;
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxCheckListBoxBase)
|
||||
};
|
||||
|
@@ -65,17 +65,17 @@ public:
|
||||
|
||||
// fill data with data on the clipboard (if available)
|
||||
virtual bool GetData( wxDataObject& data ) = 0;
|
||||
|
||||
|
||||
// clears wxTheClipboard and the system's clipboard if possible
|
||||
virtual void Clear() = 0;
|
||||
|
||||
// flushes the clipboard: this means that the data which is currently on
|
||||
// clipboard will stay available even after the application exits (possibly
|
||||
// eating memory), otherwise the clipboard will be emptied on exit
|
||||
virtual bool Flush() { return FALSE; }
|
||||
virtual bool Flush() { return false; }
|
||||
|
||||
// X11 has two clipboards which get selected by this call. Empty on MSW.
|
||||
virtual void UsePrimarySelection( bool WXUNUSED(primary) = FALSE ) { }
|
||||
virtual void UsePrimarySelection( bool WXUNUSED(primary) = false ) { }
|
||||
|
||||
// Returns global instance (wxTheClipboard) of the object:
|
||||
static wxClipboard *Get();
|
||||
|
@@ -129,8 +129,8 @@ public:
|
||||
void SetSwitchChars(const wxString& switchChars);
|
||||
|
||||
// long options are not POSIX-compliant, this option allows to disable them
|
||||
void EnableLongOptions(bool enable = TRUE);
|
||||
void DisableLongOptions() { EnableLongOptions(FALSE); }
|
||||
void EnableLongOptions(bool enable = true);
|
||||
void DisableLongOptions() { EnableLongOptions(false); }
|
||||
|
||||
bool AreLongOptionsEnabled();
|
||||
|
||||
@@ -168,7 +168,7 @@ public:
|
||||
//
|
||||
// if showUsage is true, Usage() is called in case of syntax error or if
|
||||
// help was requested
|
||||
int Parse(bool showUsage = TRUE);
|
||||
int Parse(bool showUsage = true);
|
||||
|
||||
// give the usage message describing all program options
|
||||
void Usage();
|
||||
@@ -176,19 +176,19 @@ public:
|
||||
// get the command line arguments
|
||||
// ------------------------------
|
||||
|
||||
// returns TRUE if the given switch was found
|
||||
// returns true if the given switch was found
|
||||
bool Found(const wxString& name) const;
|
||||
|
||||
// returns TRUE if an option taking a string value was found and stores the
|
||||
// returns true if an option taking a string value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxString *value) const;
|
||||
|
||||
// returns TRUE if an option taking an integer value was found and stores
|
||||
// returns true if an option taking an integer value was found and stores
|
||||
// the value in the provided pointer
|
||||
bool Found(const wxString& name, long *value) const;
|
||||
|
||||
#if wxUSE_DATETIME
|
||||
// returns TRUE if an option taking a date value was found and stores the
|
||||
// returns true if an option taking a date value was found and stores the
|
||||
// value in the provided pointer
|
||||
bool Found(const wxString& name, wxDateTime *value) const;
|
||||
#endif // wxUSE_DATETIME
|
||||
|
@@ -29,7 +29,7 @@ class WXDLLEXPORT wxMenu;
|
||||
class WXDLLEXPORT wxCommand : public wxObject
|
||||
{
|
||||
public:
|
||||
wxCommand(bool canUndoIt = FALSE, const wxString& name = wxEmptyString);
|
||||
wxCommand(bool canUndoIt = false, const wxString& name = wxEmptyString);
|
||||
~wxCommand();
|
||||
|
||||
// Override this to perform a command
|
||||
@@ -61,8 +61,8 @@ public:
|
||||
virtual ~wxCommandProcessor();
|
||||
|
||||
// Pass a command to the processor. The processor calls Do(); if
|
||||
// successful, is appended to the command history unless storeIt is FALSE.
|
||||
virtual bool Submit(wxCommand *command, bool storeIt = TRUE);
|
||||
// successful, is appended to the command history unless storeIt is false.
|
||||
virtual bool Submit(wxCommand *command, bool storeIt = true);
|
||||
|
||||
// just store the command without executing it
|
||||
virtual void Store(wxCommand *command);
|
||||
|
@@ -49,7 +49,7 @@ public:
|
||||
wxColour m_dataColour;
|
||||
wxColour m_custColours[16];
|
||||
bool m_chooseFull;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxColourData)
|
||||
};
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
m_encodingInfo = data.m_encodingInfo;
|
||||
return *this;
|
||||
}
|
||||
|
||||
|
||||
void SetAllowSymbols(bool flag) { m_allowSymbols = flag; }
|
||||
bool GetAllowSymbols() const { return m_allowSymbols; }
|
||||
|
||||
@@ -132,7 +132,7 @@ public:
|
||||
private:
|
||||
wxFontEncoding m_encoding;
|
||||
wxNativeEncodingInfo m_encodingInfo;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxFontData)
|
||||
};
|
||||
@@ -356,7 +356,7 @@ private:
|
||||
bool m_printSetupDialog;
|
||||
wxPrintData m_printData;
|
||||
|
||||
private:
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPrintDialogData)
|
||||
};
|
||||
|
||||
@@ -457,7 +457,7 @@ private:
|
||||
bool m_getDefaultInfo; // Equiv. to PSD_RETURNDEFAULT
|
||||
bool m_enableHelp;
|
||||
wxPrintData m_printData;
|
||||
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxPageSetupDialogData)
|
||||
};
|
||||
|
@@ -49,7 +49,7 @@ class WXDLLIMPEXP_BASE wxArrayString;
|
||||
|
||||
/// should we use registry instead of configuration files under Windows?
|
||||
// (i.e. whether wxConfigBase::Create() will create a wxFileConfig (if it's
|
||||
// FALSE) or wxRegConfig (if it's true and we're under Win32))
|
||||
// false) or wxRegConfig (if it's true and we're under Win32))
|
||||
#ifndef wxUSE_CONFIG_NATIVE
|
||||
#define wxUSE_CONFIG_NATIVE 1
|
||||
#endif
|
||||
@@ -94,7 +94,7 @@ public:
|
||||
static wxConfigBase *Set(wxConfigBase *pConfig);
|
||||
// get the config object, creates it on demand unless DontCreateOnDemand
|
||||
// was called
|
||||
static wxConfigBase *Get(bool createOnDemand = TRUE)
|
||||
static wxConfigBase *Get(bool createOnDemand = true)
|
||||
{ if ( createOnDemand && (!ms_pConfig) ) Create(); return ms_pConfig; }
|
||||
// create a new config object: this function will create the "best"
|
||||
// implementation of wxConfig available for the current platform, see
|
||||
@@ -102,7 +102,7 @@ public:
|
||||
// the created object and also sets it as ms_pConfig.
|
||||
static wxConfigBase *Create();
|
||||
// should Get() try to create a new log object if the current one is NULL?
|
||||
static void DontCreateOnDemand() { ms_bAutoCreate = FALSE; }
|
||||
static void DontCreateOnDemand() { ms_bAutoCreate = false; }
|
||||
|
||||
// ctor & virtual dtor
|
||||
// ctor (can be used as default ctor too)
|
||||
@@ -137,15 +137,15 @@ public:
|
||||
virtual bool GetNextEntry (wxString& str, long& lIndex) const = 0;
|
||||
// get number of entries/subgroups in the current group, with or without
|
||||
// it's subgroups
|
||||
virtual size_t GetNumberOfEntries(bool bRecursive = FALSE) const = 0;
|
||||
virtual size_t GetNumberOfGroups(bool bRecursive = FALSE) const = 0;
|
||||
virtual size_t GetNumberOfEntries(bool bRecursive = false) const = 0;
|
||||
virtual size_t GetNumberOfGroups(bool bRecursive = false) const = 0;
|
||||
|
||||
// tests of existence
|
||||
// returns TRUE if the group by this name exists
|
||||
// returns true if the group by this name exists
|
||||
virtual bool HasGroup(const wxString& strName) const = 0;
|
||||
// same as above, but for an entry
|
||||
virtual bool HasEntry(const wxString& strName) const = 0;
|
||||
// returns TRUE if either a group or an entry with a given name exist
|
||||
// returns true if either a group or an entry with a given name exist
|
||||
bool Exists(const wxString& strName) const
|
||||
{ return HasGroup(strName) || HasEntry(strName); }
|
||||
|
||||
@@ -156,7 +156,7 @@ public:
|
||||
return HasEntry(name) ? Type_String : Type_Unknown;
|
||||
}
|
||||
|
||||
// key access: returns TRUE if value was really read, FALSE if default used
|
||||
// key access: returns true if value was really read, false if default used
|
||||
// (and if the key is not found the default value is returned.)
|
||||
|
||||
// read a string from the key
|
||||
@@ -210,9 +210,9 @@ public:
|
||||
{ return Write(key, wxString(value)); }
|
||||
|
||||
// permanently writes all changes
|
||||
virtual bool Flush(bool bCurrentOnly = FALSE) = 0;
|
||||
virtual bool Flush(bool bCurrentOnly = false) = 0;
|
||||
|
||||
// renaming, all functions return FALSE on failure (probably because the new
|
||||
// renaming, all functions return false on failure (probably because the new
|
||||
// name is already taken by an existing entry)
|
||||
// rename an entry
|
||||
virtual bool RenameEntry(const wxString& oldName,
|
||||
@@ -225,7 +225,7 @@ public:
|
||||
// deletes the specified entry and the group it belongs to if
|
||||
// it was the last key in it and the second parameter is true
|
||||
virtual bool DeleteEntry(const wxString& key,
|
||||
bool bDeleteGroupIfEmpty = TRUE) = 0;
|
||||
bool bDeleteGroupIfEmpty = true) = 0;
|
||||
// delete the group (with all subgroups)
|
||||
virtual bool DeleteGroup(const wxString& key) = 0;
|
||||
// delete the whole underlying object (disk file, registry key, ...)
|
||||
@@ -236,9 +236,9 @@ public:
|
||||
// we can automatically expand environment variables in the config entries
|
||||
// (this option is on by default, you can turn it on/off at any time)
|
||||
bool IsExpandingEnvVars() const { return m_bExpandEnvVars; }
|
||||
void SetExpandEnvVars(bool bDoIt = TRUE) { m_bExpandEnvVars = bDoIt; }
|
||||
void SetExpandEnvVars(bool bDoIt = true) { m_bExpandEnvVars = bDoIt; }
|
||||
// recording of default values
|
||||
void SetRecordDefaults(bool bDoIt = TRUE) { m_bRecordDefaults = bDoIt; }
|
||||
void SetRecordDefaults(bool bDoIt = true) { m_bRecordDefaults = bDoIt; }
|
||||
bool IsRecordingDefaults() const { return m_bRecordDefaults; }
|
||||
// does expansion only if needed
|
||||
wxString ExpandEnvVars(const wxString& str) const;
|
||||
|
@@ -65,7 +65,7 @@ public:
|
||||
void HandleOnFocus(wxFocusEvent& event);
|
||||
void HandleOnWindowDestroy(wxWindowBase *child);
|
||||
|
||||
// should be called from SetFocus(), returns FALSE if we did nothing with
|
||||
// should be called from SetFocus(), returns false if we did nothing with
|
||||
// the focus and the default processing should take place
|
||||
bool DoSetFocus();
|
||||
|
||||
|
@@ -47,7 +47,7 @@
|
||||
|
||||
// Base macro for wrapping CPPUNIT_TEST macros and so making them conditional
|
||||
// tests, meaning that the test only get registered and thus run when a given
|
||||
// runtime condition is true.
|
||||
// runtime condition is true.
|
||||
// In case the condition is evaluated as false a skip message is logged
|
||||
// (the message will only be shown in verbose mode).
|
||||
#define WXTEST_ANY_WITH_CONDITION(suiteName, Condition, testMethod, anyTest) \
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 08/09/2000
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 2000 Julian Smart, Vadim Zeitlin
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_CSHELPH__
|
||||
@@ -41,7 +41,7 @@
|
||||
class WXDLLEXPORT wxContextHelp : public wxObject
|
||||
{
|
||||
public:
|
||||
wxContextHelp(wxWindow* win = NULL, bool beginHelp = TRUE);
|
||||
wxContextHelp(wxWindow* win = NULL, bool beginHelp = true);
|
||||
virtual ~wxContextHelp();
|
||||
|
||||
bool BeginContextHelp(wxWindow* win);
|
||||
@@ -54,7 +54,7 @@ public:
|
||||
|
||||
protected:
|
||||
bool m_inHelp;
|
||||
bool m_status; // TRUE if the user left-clicked
|
||||
bool m_status; // true if the user left-clicked
|
||||
|
||||
private:
|
||||
DECLARE_DYNAMIC_CLASS(wxContextHelp)
|
||||
@@ -117,7 +117,7 @@ public:
|
||||
virtual wxString GetHelp(const wxWindowBase *window) = 0;
|
||||
|
||||
// do show help for the given window (uses GetHelp() internally if
|
||||
// applicable), return TRUE if it was done or FALSE if no help available
|
||||
// applicable), return true if it was done or false if no help available
|
||||
// for this window
|
||||
virtual bool ShowHelp(wxWindowBase *window) = 0;
|
||||
|
||||
|
@@ -143,18 +143,18 @@ public:
|
||||
virtual size_t GetDataSize(const wxDataFormat& format) const = 0;
|
||||
|
||||
// copy raw data (in the specified format) to the provided buffer, return
|
||||
// TRUE if data copied successfully, FALSE otherwise
|
||||
// true if data copied successfully, false otherwise
|
||||
virtual bool GetDataHere(const wxDataFormat& format, void *buf) const = 0;
|
||||
|
||||
// get data from the buffer of specified length (in the given format),
|
||||
// return TRUE if the data was read successfully, FALSE otherwise
|
||||
// return true if the data was read successfully, false otherwise
|
||||
virtual bool SetData(const wxDataFormat& WXUNUSED(format),
|
||||
size_t WXUNUSED(len), const void * WXUNUSED(buf))
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// returns TRUE if this format is supported
|
||||
// returns true if this format is supported
|
||||
bool IsSupported(const wxDataFormat& format, Direction dir = Get) const;
|
||||
};
|
||||
|
||||
@@ -180,7 +180,7 @@ public:
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// wxDataObjectSimple is a wxDataObject which only supports one format (in
|
||||
// both Get and Set directions, but you may return FALSE from GetDataHere() or
|
||||
// both Get and Set directions, but you may return false from GetDataHere() or
|
||||
// SetData() if one of them is not supported). This is the simplest possible
|
||||
// wxDataObject implementation.
|
||||
//
|
||||
@@ -218,11 +218,11 @@ public:
|
||||
|
||||
// copy our data to the buffer
|
||||
virtual bool GetDataHere(void *WXUNUSED(buf)) const
|
||||
{ return FALSE; }
|
||||
{ return false; }
|
||||
|
||||
// copy data from buffer to our data
|
||||
virtual bool SetData(size_t WXUNUSED(len), const void *WXUNUSED(buf))
|
||||
{ return FALSE; }
|
||||
{ return false; }
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
@@ -270,8 +270,8 @@ public:
|
||||
|
||||
// add data object (it will be deleted by wxDataObjectComposite, hence it
|
||||
// must be allocated on the heap) whose format will become the preferred
|
||||
// one if preferred == TRUE
|
||||
void Add(wxDataObjectSimple *dataObject, bool preferred = FALSE);
|
||||
// one if preferred == true
|
||||
void Add(wxDataObjectSimple *dataObject, bool preferred = false);
|
||||
|
||||
// implement base class pure virtuals
|
||||
// ----------------------------------
|
||||
@@ -340,7 +340,7 @@ public:
|
||||
virtual size_t GetFormatCount(Direction WXUNUSED(dir) = Get) const { return 2; }
|
||||
virtual void GetAllFormats(wxDataFormat *formats,
|
||||
wxDataObjectBase::Direction WXUNUSED(dir) = Get) const;
|
||||
|
||||
|
||||
virtual size_t GetDataSize() const { return GetDataSize(GetPreferredFormat()); }
|
||||
virtual bool GetDataHere(void *buf) const { return GetDataHere(GetPreferredFormat(), buf); }
|
||||
virtual bool SetData(size_t len, const void *buf) { return SetData(GetPreferredFormat(), len, buf); }
|
||||
@@ -375,7 +375,7 @@ public:
|
||||
|
||||
private:
|
||||
wxString m_text;
|
||||
|
||||
|
||||
DECLARE_NO_COPY_CLASS(wxTextDataObject)
|
||||
};
|
||||
|
||||
@@ -422,7 +422,7 @@ public:
|
||||
|
||||
// the Get() functions do nothing for us
|
||||
virtual size_t GetDataSize() const { return 0; }
|
||||
virtual bool GetDataHere(void *WXUNUSED(buf)) const { return FALSE; }
|
||||
virtual bool GetDataHere(void *WXUNUSED(buf)) const { return false; }
|
||||
|
||||
protected:
|
||||
wxArrayString m_filenames;
|
||||
|
@@ -463,7 +463,7 @@ public:
|
||||
// get the current country
|
||||
static Country GetCountry();
|
||||
|
||||
// return TRUE if the country is a West European one (in practice,
|
||||
// return true if the country is a West European one (in practice,
|
||||
// this means that the same DST rules as for EEC apply)
|
||||
static bool IsWestEuropeanCountry(Country country = Country_Default);
|
||||
|
||||
@@ -479,7 +479,7 @@ public:
|
||||
// return the current month
|
||||
static Month GetCurrentMonth(Calendar cal = Gregorian);
|
||||
|
||||
// returns TRUE if the given year is a leap year in the given calendar
|
||||
// returns true if the given year is a leap year in the given calendar
|
||||
static bool IsLeapYear(int year = Inv_Year, Calendar cal = Gregorian);
|
||||
|
||||
// get the century (19 for 1999, 20 for 2000 and -5 for 492 BC)
|
||||
@@ -508,7 +508,7 @@ public:
|
||||
// get the AM and PM strings in the current locale (may be empty)
|
||||
static void GetAmPmStrings(wxString *am, wxString *pm);
|
||||
|
||||
// return TRUE if the given country uses DST for this year
|
||||
// return true if the given country uses DST for this year
|
||||
static bool IsDSTApplicable(int year = Inv_Year,
|
||||
Country country = Country_Default);
|
||||
|
||||
@@ -664,7 +664,7 @@ public:
|
||||
inline wxDateTime GetPrevWeekDay(WeekDay weekday) const;
|
||||
|
||||
// set to Nth occurence of given weekday in the given month of the
|
||||
// given year (time is set to 0), return TRUE on success and FALSE on
|
||||
// given year (time is set to 0), return true on success and false on
|
||||
// failure. n may be positive (1..5) or negative to count from the end
|
||||
// of the month (see helper function SetToLastWeekDay())
|
||||
bool SetToWeekDay(WeekDay weekday,
|
||||
@@ -685,7 +685,7 @@ public:
|
||||
int year = Inv_Year);
|
||||
|
||||
// sets the date to the given day of the given week in the year,
|
||||
// returns TRUE on success and FALSE if given date doesn't exist (e.g.
|
||||
// returns true on success and false if given date doesn't exist (e.g.
|
||||
// numWeek is > 53)
|
||||
bool SetToTheWeek(wxDateTime_t numWeek,
|
||||
WeekDay weekday = Mon,
|
||||
@@ -759,12 +759,12 @@ public:
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// transform to any given timezone
|
||||
inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = FALSE) const;
|
||||
wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = FALSE);
|
||||
inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
|
||||
wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false);
|
||||
|
||||
// transform to GMT/UTC
|
||||
wxDateTime ToGMT(bool noDST = FALSE) const { return ToTimezone(GMT0, noDST); }
|
||||
wxDateTime& MakeGMT(bool noDST = FALSE) { return MakeTimezone(GMT0, noDST); }
|
||||
wxDateTime ToGMT(bool noDST = false) const { return ToTimezone(GMT0, noDST); }
|
||||
wxDateTime& MakeGMT(bool noDST = false) { return MakeTimezone(GMT0, noDST); }
|
||||
|
||||
// is daylight savings time in effect at this moment according to the
|
||||
// rules of the specified country?
|
||||
@@ -854,20 +854,20 @@ public:
|
||||
// comparison (see also functions below for operator versions)
|
||||
// ------------------------------------------------------------------------
|
||||
|
||||
// returns TRUE if the two moments are strictly identical
|
||||
// returns true if the two moments are strictly identical
|
||||
inline bool IsEqualTo(const wxDateTime& datetime) const;
|
||||
|
||||
// returns TRUE if the date is strictly earlier than the given one
|
||||
// returns true if the date is strictly earlier than the given one
|
||||
inline bool IsEarlierThan(const wxDateTime& datetime) const;
|
||||
|
||||
// returns TRUE if the date is strictly later than the given one
|
||||
// returns true if the date is strictly later than the given one
|
||||
inline bool IsLaterThan(const wxDateTime& datetime) const;
|
||||
|
||||
// returns TRUE if the date is strictly in the given range
|
||||
// returns true if the date is strictly in the given range
|
||||
inline bool IsStrictlyBetween(const wxDateTime& t1,
|
||||
const wxDateTime& t2) const;
|
||||
|
||||
// returns TRUE if the date is in the given range
|
||||
// returns true if the date is in the given range
|
||||
inline bool IsBetween(const wxDateTime& t1, const wxDateTime& t2) const;
|
||||
|
||||
// do these two objects refer to the same date?
|
||||
@@ -984,7 +984,7 @@ private:
|
||||
// fixed to 1000
|
||||
static const long TIME_T_FACTOR;
|
||||
|
||||
// returns TRUE if we fall in range in which we can use standard ANSI C
|
||||
// returns true if we fall in range in which we can use standard ANSI C
|
||||
// functions
|
||||
inline bool IsInStdRange() const;
|
||||
|
||||
@@ -1096,11 +1096,11 @@ public:
|
||||
// are two timespans equal?
|
||||
inline bool IsEqualTo(const wxTimeSpan& ts) const;
|
||||
// compare two timestamps: works with the absolute values, i.e. -2
|
||||
// hours is longer than 1 hour. Also, it will return FALSE if the
|
||||
// hours is longer than 1 hour. Also, it will return false if the
|
||||
// timespans are equal in absolute value.
|
||||
inline bool IsLongerThan(const wxTimeSpan& ts) const;
|
||||
// compare two timestamps: works with the absolute values, i.e. 1
|
||||
// hour is shorter than -2 hours. Also, it will return FALSE if the
|
||||
// hour is shorter than -2 hours. Also, it will return false if the
|
||||
// timespans are equal in absolute value.
|
||||
bool IsShorterThan(const wxTimeSpan& t) const { return !IsLongerThan(t); }
|
||||
|
||||
@@ -1301,7 +1301,7 @@ class WXDLLIMPEXP_BASE wxDateTimeHolidayAuthority
|
||||
{
|
||||
friend class wxDateTimeHolidaysModule;
|
||||
public:
|
||||
// returns TRUE if the given date is a holiday
|
||||
// returns true if the given date is a holiday
|
||||
static bool IsHoliday(const wxDateTime& dt);
|
||||
|
||||
// fills the provided array with all holidays in the given range, returns
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 28/06/1998
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Guilhem Lavaux
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DATSTREAM_H_
|
||||
@@ -31,7 +31,7 @@ public:
|
||||
wxDataInputStream(wxInputStream& s);
|
||||
#endif
|
||||
~wxDataInputStream();
|
||||
|
||||
|
||||
bool IsOk() { return m_input->IsOk(); }
|
||||
|
||||
wxUint64 Read64();
|
||||
|
@@ -26,7 +26,7 @@
|
||||
#define _WX_DB_H_
|
||||
|
||||
|
||||
// BJO 20000503: introduce new GetColumns members which are more database independant and
|
||||
// BJO 20000503: introduce new GetColumns members which are more database independant and
|
||||
// return columns in the order they were created
|
||||
#define OLD_GETCOLUMNS 1
|
||||
#define EXPERIMENTAL_WXDB_FUNCTIONS 1
|
||||
@@ -42,7 +42,7 @@
|
||||
#include "wx/defs.h"
|
||||
#include "wx/string.h"
|
||||
|
||||
#if defined(__VISUALC__)
|
||||
#if defined(__VISUALC__)
|
||||
// we need to include standard Windows headers but we can't include
|
||||
// <windows.h> directly when using MFC because it includes it itself in a
|
||||
// different manner
|
||||
@@ -293,8 +293,8 @@ class WXDLLIMPEXP_ODBC wxDbConnectInf
|
||||
public:
|
||||
|
||||
wxDbConnectInf();
|
||||
wxDbConnectInf(HENV henv, const wxString &dsn, const wxString &userID=wxEmptyString,
|
||||
const wxString &password=wxEmptyString, const wxString &defaultDir=wxEmptyString,
|
||||
wxDbConnectInf(HENV henv, const wxString &dsn, const wxString &userID=wxEmptyString,
|
||||
const wxString &password=wxEmptyString, const wxString &defaultDir=wxEmptyString,
|
||||
const wxString &description=wxEmptyString, const wxString &fileType=wxEmptyString);
|
||||
|
||||
~wxDbConnectInf();
|
||||
@@ -488,13 +488,13 @@ private:
|
||||
wxDBMS dbmsType; // Type of datasource - i.e. Oracle, dBase, SQLServer, etc
|
||||
|
||||
// Private member functions
|
||||
bool getDbInfo(bool failOnDataTypeUnsupported=TRUE);
|
||||
bool getDbInfo(bool failOnDataTypeUnsupported=true);
|
||||
bool getDataTypeInfo(SWORD fSqlType, wxDbSqlTypeInfo &structSQLTypeInfo);
|
||||
bool setConnectionOptions(void);
|
||||
void logError(const wxString &errMsg, const wxString &SQLState);
|
||||
const wxChar *convertUserID(const wxChar *userID, wxString &UserID);
|
||||
void initialize();
|
||||
bool open(bool failOnDataTypeUnsupported=TRUE);
|
||||
bool open(bool failOnDataTypeUnsupported=true);
|
||||
|
||||
#if !wxODBC_BACKWARD_COMPATABILITY
|
||||
// ODBC handles
|
||||
@@ -606,9 +606,9 @@ public:
|
||||
~wxDb();
|
||||
|
||||
// Data Source Name, User ID, Password and whether open should fail on data type not supported
|
||||
bool Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported=TRUE);
|
||||
bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=TRUE);
|
||||
bool Open(wxDbConnectInf *dbConnectInf, bool failOnDataTypeUnsupported=TRUE);
|
||||
bool Open(const wxString& inConnectStr, bool failOnDataTypeUnsupported=true);
|
||||
bool Open(const wxString &Dsn, const wxString &Uid, const wxString &AuthStr, bool failOnDataTypeUnsupported=true);
|
||||
bool Open(wxDbConnectInf *dbConnectInf, bool failOnDataTypeUnsupported=true);
|
||||
bool Open(wxDb *copyDb); // pointer to a wxDb whose connection info should be copied rather than re-queried
|
||||
void Close(void);
|
||||
bool CommitTrans(void);
|
||||
@@ -616,7 +616,7 @@ public:
|
||||
bool DispAllErrors(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
|
||||
bool GetNextError(HENV aHenv, HDBC aHdbc = SQL_NULL_HDBC, HSTMT aHstmt = SQL_NULL_HSTMT);
|
||||
void DispNextError(void);
|
||||
bool CreateView(const wxString &viewName, const wxString &colList, const wxString &pSqlStmt, bool attemptDrop=TRUE);
|
||||
bool CreateView(const wxString &viewName, const wxString &colList, const wxString &pSqlStmt, bool attemptDrop=true);
|
||||
bool DropView(const wxString &viewName);
|
||||
bool ExecSql(const wxString &pSqlStmt);
|
||||
bool GetNext(void);
|
||||
@@ -628,7 +628,7 @@ public:
|
||||
int GetKeyFields(const wxString &tableName, wxDbColInf* colInf, UWORD noCols);
|
||||
|
||||
wxDbColInf *GetColumns(wxChar *tableName[], const wxChar *userID=NULL);
|
||||
wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
|
||||
wxDbColInf *GetColumns(const wxString &tableName, UWORD *numCols, const wxChar *userID=NULL);
|
||||
|
||||
int GetColumnCount(const wxString &tableName, const wxChar *userID=NULL);
|
||||
const wxChar *GetDatabaseName(void) {return dbInf.dbmsName;}
|
||||
@@ -651,25 +651,25 @@ public:
|
||||
wxDbSqlTypeInfo GetTypeInfBlob() {return typeInfBlob;}
|
||||
|
||||
// tableName can refer to a table, view, alias or synonym
|
||||
bool TableExists(const wxString &tableName, const wxChar *userID=NULL,
|
||||
bool TableExists(const wxString &tableName, const wxChar *userID=NULL,
|
||||
const wxString &tablePath=wxEmptyString);
|
||||
bool TablePrivileges(const wxString &tableName, const wxString &priv,
|
||||
const wxChar *userID=NULL, const wxChar *schema=NULL,
|
||||
bool TablePrivileges(const wxString &tableName, const wxString &priv,
|
||||
const wxChar *userID=NULL, const wxChar *schema=NULL,
|
||||
const wxString &path=wxEmptyString);
|
||||
|
||||
// These two functions return the table name or column name in a form ready
|
||||
// for use in SQL statements. For example, if the datasource allows spaces
|
||||
// in the table name or column name, the returned string will have the
|
||||
// correct enclosing marks around the name to allow it to be properly
|
||||
// correct enclosing marks around the name to allow it to be properly
|
||||
// included in a SQL statement
|
||||
const wxString SQLTableName(const wxChar *tableName);
|
||||
const wxString SQLColumnName(const wxChar *colName);
|
||||
|
||||
void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString)
|
||||
void LogError(const wxString &errMsg, const wxString &SQLState = wxEmptyString)
|
||||
{ logError(errMsg, SQLState); }
|
||||
void SetDebugErrorMessages(bool state) { silent = !state; }
|
||||
bool SetSqlLogging(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME,
|
||||
bool append = FALSE);
|
||||
bool SetSqlLogging(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME,
|
||||
bool append = false);
|
||||
bool WriteSqlLog(const wxString &logMsg);
|
||||
|
||||
wxDBMS Dbms(void);
|
||||
@@ -742,7 +742,7 @@ wxDbSqlLog(wxDbSqlLogState state, const wxString &filename = SQL_LOG_FILENAME);
|
||||
#if 0
|
||||
// MSW/VC6 ONLY!!! Experimental
|
||||
int WXDLLEXPORT wxDbCreateDataSource(const wxString &driverName, const wxString &dsn, const wxString &description=wxEmptyString,
|
||||
bool sysDSN=FALSE, const wxString &defDir=wxEmptyString, wxWindow *parent=NULL);
|
||||
bool sysDSN=false, const wxString &defDir=wxEmptyString, wxWindow *parent=NULL);
|
||||
#endif
|
||||
|
||||
// This routine allows you to query a driver manager
|
||||
|
@@ -118,7 +118,7 @@ class WXDLLIMPEXP_DBGRID wxDbGridTableBase : public wxGridTableBase
|
||||
{
|
||||
public:
|
||||
wxDbGridTableBase(wxDbTable *tab, wxDbGridColInfo *ColInfo,
|
||||
int count = wxUSE_QUERY, bool takeOwnership = TRUE);
|
||||
int count = wxUSE_QUERY, bool takeOwnership = true);
|
||||
~wxDbGridTableBase();
|
||||
|
||||
virtual int GetNumberRows()
|
||||
@@ -150,12 +150,12 @@ public:
|
||||
|
||||
virtual wxString GetColLabelValue(int col);
|
||||
|
||||
virtual bool AssignDbTable(wxDbTable *tab, int count = wxUSE_QUERY, bool takeOwnership=TRUE);
|
||||
virtual bool AssignDbTable(wxDbTable *tab, int count = wxUSE_QUERY, bool takeOwnership=true);
|
||||
virtual void ValidateRow(int row);
|
||||
virtual bool UpdateRow(int row) const
|
||||
{
|
||||
if (m_row != row)
|
||||
return TRUE;
|
||||
return true;
|
||||
else
|
||||
return Writeback();
|
||||
}
|
||||
|
@@ -3,7 +3,7 @@
|
||||
// Purpose: Generic key support for wxDbTable
|
||||
// Author: Roger Gammans
|
||||
// Modified by:
|
||||
// Created:
|
||||
// Created:
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) 1999 The Computer Surgery (roger@computer-surgery.co.uk)
|
||||
// Licence: wxWindows licence
|
||||
|
@@ -32,8 +32,8 @@
|
||||
|
||||
const int wxDB_ROWID_LEN = 24; // 18 is the max, 24 is in case it gets larger
|
||||
const int wxDB_DEFAULT_CURSOR = 0;
|
||||
const bool wxDB_QUERY_ONLY = TRUE;
|
||||
const bool wxDB_DISABLE_VIEW = TRUE;
|
||||
const bool wxDB_QUERY_ONLY = true;
|
||||
const bool wxDB_DISABLE_VIEW = true;
|
||||
|
||||
// Used to indicate end of a variable length list of
|
||||
// column numbers passed to member functions
|
||||
@@ -55,7 +55,7 @@ public:
|
||||
SWORD SqlCtype; // C data type; e.g. SQL_C_LONG
|
||||
void *PtrDataObj; // Address of the data object
|
||||
int SzDataObj; // Size, in bytes, of the data object
|
||||
bool KeyField; // TRUE if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields.
|
||||
bool KeyField; // true if this column is part of the PRIMARY KEY to the table; Date fields should NOT be KeyFields.
|
||||
bool Updateable; // Specifies whether this column is updateable
|
||||
bool InsertAllowed; // Specifies whether this column should be included in an INSERT statement
|
||||
bool DerivedCol; // Specifies whether this column is a derived value
|
||||
@@ -181,27 +181,27 @@ public:
|
||||
#endif
|
||||
// Public member functions
|
||||
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
||||
const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||
const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||
const wxString &tblPath=wxEmptyString);
|
||||
|
||||
// DEPRECATED
|
||||
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
|
||||
const wxChar *qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||
const wxChar *qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
|
||||
const wxString &tblPath=wxEmptyString);
|
||||
|
||||
virtual ~wxDbTable();
|
||||
|
||||
bool Open(bool checkPrivileges=FALSE, bool checkTableExists=TRUE);
|
||||
bool CreateTable(bool attemptDrop=TRUE);
|
||||
bool Open(bool checkPrivileges=false, bool checkTableExists=true);
|
||||
bool CreateTable(bool attemptDrop=true);
|
||||
bool DropTable(void);
|
||||
bool CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCols,
|
||||
wxDbIdxDef *pIdxDefs, bool attemptDrop=TRUE);
|
||||
bool CreateIndex(const wxString &idxName, bool unique, UWORD noIdxCols,
|
||||
wxDbIdxDef *pIdxDefs, bool attemptDrop=true);
|
||||
bool DropIndex(const wxString &idxName);
|
||||
|
||||
// Accessors
|
||||
|
||||
// The member variables returned by these accessors are all
|
||||
// set when the wxDbTable instance is created and cannot be
|
||||
// set when the wxDbTable instance is created and cannot be
|
||||
// changed, hence there is no corresponding SetXxxx function
|
||||
wxDb *GetDb() { return pDb; }
|
||||
const wxString &GetTableName() { return tableName; }
|
||||
@@ -238,10 +238,10 @@ public:
|
||||
bool Delete(void);
|
||||
bool DeleteWhere(const wxString &pWhereClause);
|
||||
bool DeleteMatching(void);
|
||||
virtual bool Query(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
virtual bool Query(bool forUpdate = false, bool distinct = false);
|
||||
bool QueryBySqlStmt(const wxString &pSqlStmt);
|
||||
bool QueryMatching(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
bool QueryOnKeyFields(bool forUpdate = FALSE, bool distinct = FALSE);
|
||||
bool QueryMatching(bool forUpdate = false, bool distinct = false);
|
||||
bool QueryOnKeyFields(bool forUpdate = false, bool distinct = false);
|
||||
bool Refresh(void);
|
||||
bool GetNext(void) { return(getRec(SQL_FETCH_NEXT)); }
|
||||
bool operator++(int) { return(getRec(SQL_FETCH_NEXT)); }
|
||||
@@ -265,8 +265,8 @@ public:
|
||||
void BuildUpdateStmt(wxString &pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString);
|
||||
void BuildUpdateStmt(wxChar *pSqlStmt, int typeOfUpd, const wxString &pWhereClause=wxEmptyString);
|
||||
|
||||
void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE);
|
||||
void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=FALSE);
|
||||
void BuildWhereClause(wxString &pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
|
||||
void BuildWhereClause(wxChar *pWhereClause, int typeOfWhere, const wxString &qualTableName=wxEmptyString, bool useLikeComparison=false);
|
||||
|
||||
#if wxODBC_BACKWARD_COMPATABILITY
|
||||
// The following member functions are deprecated. You should use the BuildXxxxxStmt functions (above)
|
||||
@@ -276,43 +276,43 @@ public:
|
||||
{ BuildDeleteStmt(pSqlStmt,typeOfDel,pWhereClause); }
|
||||
void GetUpdateStmt(char *pSqlStmt, int typeOfUpd, const char *pWhereClause = NULL)
|
||||
{ BuildUpdateStmt(pSqlStmt,typeOfUpd,pWhereClause); }
|
||||
void GetWhereClause(char *pWhereClause, int typeOfWhere,
|
||||
const char *qualTableName = NULL, bool useLikeComparison=FALSE)
|
||||
void GetWhereClause(char *pWhereClause, int typeOfWhere,
|
||||
const char *qualTableName = NULL, bool useLikeComparison=false)
|
||||
{ BuildWhereClause(pWhereClause,typeOfWhere,qualTableName,useLikeComparison); }
|
||||
#endif
|
||||
bool CanSelectForUpdate(void);
|
||||
bool CanUpdByROWID(void);
|
||||
void ClearMemberVar(UWORD colNo, bool setToNull=FALSE);
|
||||
void ClearMemberVars(bool setToNull=FALSE);
|
||||
void ClearMemberVar(UWORD colNo, bool setToNull=false);
|
||||
void ClearMemberVars(bool setToNull=false);
|
||||
bool SetQueryTimeout(UDWORD nSeconds);
|
||||
|
||||
wxDbColDef *GetColDefs() { return colDefs; }
|
||||
void SetColDefs(UWORD index, const wxString &fieldName, int dataType,
|
||||
void SetColDefs(UWORD index, const wxString &fieldName, int dataType,
|
||||
void *pData, SWORD cType,
|
||||
int size, bool keyField = FALSE, bool upd = TRUE,
|
||||
bool insAllow = TRUE, bool derivedCol = FALSE);
|
||||
int size, bool keyField = false, bool upd = true,
|
||||
bool insAllow = true, bool derivedCol = false);
|
||||
wxDbColDataPtr *SetColDefs(wxDbColInf *colInfs, UWORD numCols);
|
||||
|
||||
bool CloseCursor(HSTMT cursor);
|
||||
bool DeleteCursor(HSTMT *hstmtDel);
|
||||
void SetCursor(HSTMT *hstmtActivate = (void **) wxDB_DEFAULT_CURSOR);
|
||||
HSTMT GetCursor(void) { return(hstmt); }
|
||||
HSTMT *GetNewCursor(bool setCursor = FALSE, bool bindColumns = TRUE);
|
||||
HSTMT *GetNewCursor(bool setCursor = false, bool bindColumns = true);
|
||||
#if wxODBC_BACKWARD_COMPATABILITY
|
||||
// The following member function is deprecated. You should use the GetNewCursor
|
||||
HSTMT *NewCursor(bool setCursor = FALSE, bool bindColumns = TRUE) { return GetNewCursor(setCursor,bindColumns); }
|
||||
HSTMT *NewCursor(bool setCursor = false, bool bindColumns = true) { return GetNewCursor(setCursor,bindColumns); }
|
||||
#endif
|
||||
|
||||
ULONG Count(const wxString &args=_T("*"));
|
||||
int DB_STATUS(void) { return(pDb->DB_STATUS); }
|
||||
|
||||
bool IsColNull(UWORD colNo) const;
|
||||
bool SetColNull(UWORD colNo, bool set=TRUE);
|
||||
bool SetColNull(const wxString &colName, bool set=TRUE);
|
||||
bool SetColNull(UWORD colNo, bool set=true);
|
||||
bool SetColNull(const wxString &colName, bool set=true);
|
||||
#if wxODBC_BACKWARD_COMPATABILITY
|
||||
// The following member functions are deprecated. You should use the SetColNull()
|
||||
bool SetNull(int colNo, bool set=TRUE) { return (SetNull(colNo,set)); }
|
||||
bool SetNull(const char *colName, bool set=TRUE) { return (SetNull(colName,set)); }
|
||||
bool SetNull(int colNo, bool set=true) { return (SetNull(colNo,set)); }
|
||||
bool SetNull(const char *colName, bool set=true) { return (SetNull(colName,set)); }
|
||||
#endif
|
||||
#ifdef __WXDEBUG__
|
||||
ULONG GetTableID() { return tableID; }
|
||||
@@ -334,7 +334,7 @@ public:
|
||||
// typedef enum {unmodified=0, UpdatePending, InsertPending } recStatus;
|
||||
|
||||
// recStatus get_ModifiedStatus() { return m_recstatus; }
|
||||
|
||||
|
||||
// void modify() {
|
||||
// if (m_recstatus==unmodified)
|
||||
// m_recstatus=UpdatePending;
|
||||
|
@@ -39,7 +39,7 @@ class WXDLLEXPORT wxDrawObject
|
||||
public:
|
||||
|
||||
wxDrawObject()
|
||||
: m_isBBoxValid(FALSE)
|
||||
: m_isBBoxValid(false)
|
||||
, m_minX(0), m_minY(0), m_maxX(0), m_maxY(0)
|
||||
{ }
|
||||
|
||||
@@ -58,7 +58,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
m_isBBoxValid = TRUE;
|
||||
m_isBBoxValid = true;
|
||||
|
||||
m_minX = x;
|
||||
m_minY = y;
|
||||
@@ -69,7 +69,7 @@ public:
|
||||
|
||||
void ResetBoundingBox()
|
||||
{
|
||||
m_isBBoxValid = FALSE;
|
||||
m_isBBoxValid = false;
|
||||
|
||||
m_minX = m_maxX = m_minY = m_maxY = 0;
|
||||
}
|
||||
@@ -106,10 +106,10 @@ class WXDLLEXPORT wxDCBase : public wxObject
|
||||
public:
|
||||
wxDCBase()
|
||||
: m_colour(wxColourDisplay())
|
||||
, m_ok(TRUE)
|
||||
, m_clipping(FALSE)
|
||||
, m_ok(true)
|
||||
, m_clipping(false)
|
||||
, m_isInteractive(0)
|
||||
, m_isBBoxValid(FALSE)
|
||||
, m_isBBoxValid(false)
|
||||
, m_logicalOriginX(0), m_logicalOriginY(0)
|
||||
, m_deviceOriginX(0), m_deviceOriginY(0)
|
||||
, m_logicalScaleX(1.0), m_logicalScaleY(1.0)
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
, m_font()
|
||||
#if wxUSE_PALETTE
|
||||
, m_palette()
|
||||
, m_hasCustomPalette(FALSE)
|
||||
, m_hasCustomPalette(false)
|
||||
#endif // wxUSE_PALETTE
|
||||
{
|
||||
ResetBoundingBox();
|
||||
@@ -251,10 +251,10 @@ public:
|
||||
{ DoDrawIcon(icon, pt.x, pt.y); }
|
||||
|
||||
void DrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = FALSE)
|
||||
bool useMask = false)
|
||||
{ DoDrawBitmap(bmp, x, y, useMask); }
|
||||
void DrawBitmap(const wxBitmap &bmp, const wxPoint& pt,
|
||||
bool useMask = FALSE)
|
||||
bool useMask = false)
|
||||
{ DoDrawBitmap(bmp, pt.x, pt.y, useMask); }
|
||||
|
||||
void DrawText(const wxString& text, wxCoord x, wxCoord y)
|
||||
@@ -285,14 +285,14 @@ public:
|
||||
|
||||
bool Blit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1)
|
||||
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
|
||||
{
|
||||
return DoBlit(xdest, ydest, width, height,
|
||||
source, xsrc, ysrc, rop, useMask, xsrcMask, ysrcMask);
|
||||
}
|
||||
bool Blit(const wxPoint& destPt, const wxSize& sz,
|
||||
wxDC *source, const wxPoint& srcPt,
|
||||
int rop = wxCOPY, bool useMask = FALSE, const wxPoint& srcPtMask = wxPoint(-1, -1))
|
||||
int rop = wxCOPY, bool useMask = false, const wxPoint& srcPtMask = wxDefaultPosition)
|
||||
{
|
||||
return DoBlit(destPt.x, destPt.y, sz.x, sz.y,
|
||||
source, srcPt.x, srcPt.y, rop, useMask, srcPtMask.x, srcPtMask.y);
|
||||
@@ -361,7 +361,7 @@ public:
|
||||
|
||||
virtual void Clear() = 0;
|
||||
|
||||
virtual bool StartDoc(const wxString& WXUNUSED(message)) { return TRUE; }
|
||||
virtual bool StartDoc(const wxString& WXUNUSED(message)) { return true; }
|
||||
virtual void EndDoc() { }
|
||||
|
||||
virtual void StartPage() { }
|
||||
@@ -538,7 +538,7 @@ public:
|
||||
//
|
||||
// FIXME: is this (still) used?
|
||||
virtual void SetOptimization(bool WXUNUSED(opt)) { }
|
||||
virtual bool GetOptimization() { return FALSE; }
|
||||
virtual bool GetOptimization() { return false; }
|
||||
|
||||
// bounding box
|
||||
// ------------
|
||||
@@ -554,7 +554,7 @@ public:
|
||||
}
|
||||
else
|
||||
{
|
||||
m_isBBoxValid = TRUE;
|
||||
m_isBBoxValid = true;
|
||||
|
||||
m_minX = x;
|
||||
m_minY = y;
|
||||
@@ -565,7 +565,7 @@ public:
|
||||
|
||||
void ResetBoundingBox()
|
||||
{
|
||||
m_isBBoxValid = FALSE;
|
||||
m_isBBoxValid = false;
|
||||
|
||||
m_minX = m_maxX = m_minY = m_maxY = 0;
|
||||
}
|
||||
@@ -658,7 +658,7 @@ protected:
|
||||
|
||||
virtual void DoDrawIcon(const wxIcon& icon, wxCoord x, wxCoord y) = 0;
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = FALSE) = 0;
|
||||
bool useMask = false) = 0;
|
||||
|
||||
virtual void DoDrawText(const wxString& text, wxCoord x, wxCoord y) = 0;
|
||||
virtual void DoDrawRotatedText(const wxString& text,
|
||||
@@ -667,7 +667,7 @@ protected:
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord width, wxCoord height,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = FALSE, wxCoord xsrcMask = -1, wxCoord ysrcMask = -1) = 0;
|
||||
int rop = wxCOPY, bool useMask = false, wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord) = 0;
|
||||
|
||||
virtual void DoGetSize(int *width, int *height) const = 0;
|
||||
virtual void DoGetSizeMM(int* width, int* height) const = 0;
|
||||
|
@@ -124,7 +124,7 @@ public:
|
||||
: m_paintdc(window)
|
||||
{
|
||||
window->PrepareDC( m_paintdc );
|
||||
|
||||
|
||||
if( buffer != wxNullBitmap )
|
||||
Init(&m_paintdc, buffer);
|
||||
else
|
||||
|
@@ -137,7 +137,7 @@ protected:
|
||||
wxFAIL_MSG( _T("this is probably wrong") );
|
||||
|
||||
m_dc.DoDrawArc(GetX(x1, y1), GetY(x1, y1),
|
||||
GetX(x2, y2), GetY(x2, y2),
|
||||
GetX(x2, y2), GetY(x2, y2),
|
||||
xc, yc);
|
||||
}
|
||||
|
||||
@@ -154,7 +154,7 @@ protected:
|
||||
wxFAIL_MSG( _T("this is probably wrong") );
|
||||
|
||||
m_dc.DoDrawEllipticArc(GetX(x, y), GetY(x, y),
|
||||
GetX(w, h), GetY(w, h),
|
||||
GetX(w, h), GetY(w, h),
|
||||
sa, ea);
|
||||
}
|
||||
|
||||
@@ -188,7 +188,7 @@ protected:
|
||||
}
|
||||
|
||||
virtual void DoDrawBitmap(const wxBitmap &bmp, wxCoord x, wxCoord y,
|
||||
bool useMask = FALSE)
|
||||
bool useMask = false)
|
||||
{
|
||||
m_dc.DoDrawBitmap(bmp, GetX(x, y), GetY(x, y), useMask);
|
||||
}
|
||||
@@ -209,8 +209,8 @@ protected:
|
||||
virtual bool DoBlit(wxCoord xdest, wxCoord ydest,
|
||||
wxCoord w, wxCoord h,
|
||||
wxDC *source, wxCoord xsrc, wxCoord ysrc,
|
||||
int rop = wxCOPY, bool useMask = FALSE,
|
||||
wxCoord xsrcMask = -1, wxCoord ysrcMask = -1)
|
||||
int rop = wxCOPY, bool useMask = false,
|
||||
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord)
|
||||
{
|
||||
return m_dc.DoBlit(GetX(xdest, ydest), GetY(xdest, ydest),
|
||||
GetX(w, h), GetY(w, h),
|
||||
|
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Name: wx/debug.h
|
||||
* Purpose: Misc debug functions and macros
|
||||
* Author: Vadim Zeitlin
|
||||
* Name: wx/debug.h
|
||||
* Purpose: Misc debug functions and macros
|
||||
* Author: Vadim Zeitlin
|
||||
* Modified by: Ryan Norton (Converted to C)
|
||||
* Created: 29/01/98
|
||||
* RCS-ID: $Id$
|
||||
* Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
* Licence: wxWindows licence
|
||||
* Created: 29/01/98
|
||||
* RCS-ID: $Id$
|
||||
* Copyright: (c) 1998 Vadim Zeitlin <zeitlin@dptmaths.ens-cachan.fr>
|
||||
* Licence: wxWindows licence
|
||||
*/
|
||||
|
||||
/* THIS IS A C FILE, DON'T USE C++ FEATURES (IN PARTICULAR COMMENTS) IN IT */
|
||||
@@ -52,7 +52,7 @@
|
||||
/* */
|
||||
/* All debugging macros rely on ASSERT() which in turn calls user-defined */
|
||||
/* OnAssert() function. To keep things simple, it's called even when the */
|
||||
/* expression is TRUE (i.e. everything is ok) and by default does nothing: just */
|
||||
/* expression is true (i.e. everything is ok) and by default does nothing: just */
|
||||
/* returns the same value back. But if you redefine it to do something more sexy */
|
||||
/* (popping up a message box in your favourite GUI, sending you e-mail or */
|
||||
/* whatever) it will affect all ASSERTs, FAILs and CHECKs in your code. */
|
||||
@@ -125,7 +125,7 @@
|
||||
#endif /* __WXDEBUG__ */
|
||||
|
||||
#ifdef __cplusplus
|
||||
/* Use of wxFalse instead of FALSE suppresses compiler warnings about testing */
|
||||
/* Use of wxFalse instead of false suppresses compiler warnings about testing */
|
||||
/* constant expression */
|
||||
WXDLLIMPEXP_DATA_BASE(extern const bool) wxFalse;
|
||||
#endif
|
||||
|
@@ -696,9 +696,9 @@ typedef wxUint16 wxWord;
|
||||
typedef int wxInt32;
|
||||
typedef unsigned int wxUint32;
|
||||
|
||||
#if defined(__MACH__) && !defined(SIZEOF_WCHAR_T)
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#endif
|
||||
#if defined(__MACH__) && !defined(SIZEOF_WCHAR_T)
|
||||
#define SIZEOF_WCHAR_T 4
|
||||
#endif
|
||||
#if wxUSE_WCHAR_T && !defined(SIZEOF_WCHAR_T)
|
||||
/* also assume that sizeof(wchar_t) == 2 (under Unix the most */
|
||||
/* common case is 4 but there configure would have defined */
|
||||
@@ -1039,7 +1039,7 @@ enum wxStretch
|
||||
wxTILE = 0xc000,
|
||||
|
||||
// for compatibility only, default now, don't use explicitly any more
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
#if WXWIN_COMPATIBILITY_2_4
|
||||
wxADJUST_MINSIZE = 0x00100000
|
||||
#else
|
||||
wxADJUST_MINSIZE = 0
|
||||
|
@@ -56,7 +56,7 @@ public:
|
||||
static wxDialUpManager *Create();
|
||||
|
||||
// could the dialup manager be initialized correctly? If this function
|
||||
// returns FALSE, no other functions will work neither, so it's a good idea
|
||||
// returns false, no other functions will work neither, so it's a good idea
|
||||
// to call this function and check its result before calling any other
|
||||
// wxDialUpManager methods
|
||||
virtual bool IsOk() const = 0;
|
||||
@@ -78,20 +78,20 @@ public:
|
||||
// if no username/password are given, the function will try to do without
|
||||
// them, but will ask the user if really needed
|
||||
//
|
||||
// if async parameter is FALSE, the function waits until the end of dialing
|
||||
// and returns TRUE upon successful completion.
|
||||
// if async is TRUE, the function only initiates the connection and returns
|
||||
// if async parameter is false, the function waits until the end of dialing
|
||||
// and returns true upon successful completion.
|
||||
// if async is true, the function only initiates the connection and returns
|
||||
// immediately - the result is reported via events (an event is sent
|
||||
// anyhow, but if dialing failed it will be a DISCONNECTED one)
|
||||
virtual bool Dial(const wxString& nameOfISP = wxEmptyString,
|
||||
const wxString& username = wxEmptyString,
|
||||
const wxString& password = wxEmptyString,
|
||||
bool async = TRUE) = 0;
|
||||
bool async = true) = 0;
|
||||
|
||||
// returns TRUE if (async) dialing is in progress
|
||||
// returns true if (async) dialing is in progress
|
||||
virtual bool IsDialing() const = 0;
|
||||
|
||||
// cancel dialing the number initiated with Dial(async = TRUE)
|
||||
// cancel dialing the number initiated with Dial(async = true)
|
||||
// NB: this won't result in DISCONNECTED event being sent
|
||||
virtual bool CancelDialing() = 0;
|
||||
|
||||
@@ -101,7 +101,7 @@ public:
|
||||
// online status
|
||||
// -------------
|
||||
|
||||
// returns TRUE if the computer has a permanent network connection (i.e. is
|
||||
// returns true if the computer has a permanent network connection (i.e. is
|
||||
// on a LAN) and so there is no need to use Dial() function to go online
|
||||
//
|
||||
// NB: this functions tries to guess the result and it is not always
|
||||
@@ -109,7 +109,7 @@ public:
|
||||
// confirmation or give him a possibility to override it
|
||||
virtual bool IsAlwaysOnline() const = 0;
|
||||
|
||||
// returns TRUE if the computer is connected to the network: under Windows,
|
||||
// returns true if the computer is connected to the network: under Windows,
|
||||
// this just means that a RAS connection exists, under Unix we check that
|
||||
// the "well-known host" (as specified by SetWellKnownHost) is reachable
|
||||
virtual bool IsOnline() const = 0;
|
||||
@@ -118,7 +118,7 @@ public:
|
||||
// so, in general, the user should be allowed to override it. This function
|
||||
// allows to forcefully set the online status - whatever our internal
|
||||
// algorithm may think about it.
|
||||
virtual void SetOnlineStatus(bool isOnline = TRUE) = 0;
|
||||
virtual void SetOnlineStatus(bool isOnline = true) = 0;
|
||||
|
||||
// set misc wxDialUpManager options
|
||||
// --------------------------------
|
||||
@@ -129,7 +129,7 @@ public:
|
||||
// Windows, the notification about the change of connection status is
|
||||
// instantenous.
|
||||
//
|
||||
// Returns FALSE if couldn't set up automatic check for online status.
|
||||
// Returns false if couldn't set up automatic check for online status.
|
||||
virtual bool EnableAutoCheckOnlineStatus(size_t nSeconds = 60) = 0;
|
||||
|
||||
// disable automatic check for connection status change - notice that the
|
||||
@@ -192,9 +192,9 @@ typedef void (wxEvtHandler::*wxDialUpEventFunction)(wxDialUpEvent&);
|
||||
|
||||
// macros to catch dialup events
|
||||
#define EVT_DIALUP_CONNECTED(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_CONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxDialUpEventFunction, & func ), NULL),
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_CONNECTED, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxDialUpEventFunction, & func ), NULL),
|
||||
#define EVT_DIALUP_DISCONNECTED(func) \
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_DISCONNECTED, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxDialUpEventFunction, & func ), NULL),
|
||||
DECLARE_EVENT_TABLE_ENTRY( wxEVT_DIALUP_DISCONNECTED, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxDialUpEventFunction, & func ), NULL),
|
||||
|
||||
|
||||
#endif // wxUSE_DIALUP_MANAGER
|
||||
|
@@ -104,7 +104,7 @@ public:
|
||||
// open the directory for enumerating
|
||||
bool Open(const wxString& dir);
|
||||
|
||||
// returns TRUE if the directory was successfully opened
|
||||
// returns true if the directory was successfully opened
|
||||
bool IsOpened() const;
|
||||
|
||||
// get the full name of the directory (without '/' at the end)
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
// -------------------------
|
||||
|
||||
// start enumerating all files matching filespec (or all files if it is
|
||||
// empty) and flags, return TRUE on success
|
||||
// empty) and flags, return true on success
|
||||
bool GetFirst(wxString *filename,
|
||||
const wxString& filespec = wxEmptyString,
|
||||
int flags = wxDIR_DEFAULT) const;
|
||||
|
@@ -24,7 +24,7 @@
|
||||
class WXDLLEXPORT wxWindow;
|
||||
class WXDLLEXPORT wxPoint;
|
||||
class WXDLLEXPORT wxRect;
|
||||
class WXDLLEXPORT wxString;
|
||||
class WXDLLEXPORT wxString;
|
||||
|
||||
WX_DECLARE_EXPORTED_OBJARRAY(wxVideoMode, wxArrayVideoModes);
|
||||
|
||||
|
@@ -97,9 +97,9 @@ public:
|
||||
virtual wxDragResult DoDragDrop(int flags = wxDrag_CopyOnly) = 0;
|
||||
|
||||
// override to give feedback depending on the current operation result
|
||||
// "effect" and return TRUE if you did something, FALSE to let the library
|
||||
// "effect" and return true if you did something, false to let the library
|
||||
// give the default feedback
|
||||
virtual bool GiveFeedback(wxDragResult WXUNUSED(effect)) { return FALSE; }
|
||||
virtual bool GiveFeedback(wxDragResult WXUNUSED(effect)) { return false; }
|
||||
|
||||
protected:
|
||||
const wxCursor& GetCursor(wxDragResult res) const
|
||||
@@ -177,7 +177,7 @@ public:
|
||||
virtual void OnLeave() { }
|
||||
|
||||
// this function is called when data is dropped at position (x, y) - if it
|
||||
// returns TRUE, OnData() will be called immediately afterwards which will
|
||||
// returns true, OnData() will be called immediately afterwards which will
|
||||
// allow to retrieve the data dropped.
|
||||
virtual bool OnDrop(wxCoord x, wxCoord y) = 0;
|
||||
|
||||
@@ -189,7 +189,7 @@ public:
|
||||
virtual wxDragResult OnData(wxCoord x, wxCoord y, wxDragResult def) = 0;
|
||||
|
||||
// may be called *only* from inside OnData() and will fill m_dataObject
|
||||
// with the data from the drop source if it returns TRUE
|
||||
// with the data from the drop source if it returns true
|
||||
virtual bool GetData() = 0;
|
||||
|
||||
protected:
|
||||
|
@@ -6,7 +6,7 @@
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c)
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_DOCMDI_H_
|
||||
@@ -92,7 +92,7 @@ public:
|
||||
inline void SetDocument(wxDocument *doc) { m_childDocument = doc; }
|
||||
inline void SetView(wxView *view) { m_childView = view; }
|
||||
bool Destroy() { m_childView = (wxView *)NULL; return wxMDIChildFrame::Destroy(); }
|
||||
|
||||
|
||||
protected:
|
||||
void Init();
|
||||
wxDocument* m_childDocument;
|
||||
|
@@ -72,7 +72,7 @@ public:
|
||||
~wxDocument();
|
||||
|
||||
// accessors
|
||||
void SetFilename(const wxString& filename, bool notifyViews = FALSE);
|
||||
void SetFilename(const wxString& filename, bool notifyViews = false);
|
||||
wxString GetFilename() const { return m_documentFile; }
|
||||
|
||||
void SetTitle(const wxString& title) { m_documentTitle = title; };
|
||||
@@ -82,7 +82,7 @@ public:
|
||||
wxString GetDocumentName() const { return m_documentTypeName; }
|
||||
|
||||
bool GetDocumentSaved() const { return m_savedYet; }
|
||||
void SetDocumentSaved(bool saved = TRUE) { m_savedYet = saved; }
|
||||
void SetDocumentSaved(bool saved = true) { m_savedYet = saved; }
|
||||
|
||||
virtual bool Close();
|
||||
virtual bool Save();
|
||||
@@ -103,9 +103,9 @@ public:
|
||||
virtual bool OnNewDocument();
|
||||
virtual bool OnCloseDocument();
|
||||
|
||||
// Prompts for saving if about to close a modified document. Returns TRUE
|
||||
// Prompts for saving if about to close a modified document. Returns true
|
||||
// if ok to close the document (may have saved in the meantime, or set
|
||||
// modified to FALSE)
|
||||
// modified to false)
|
||||
virtual bool OnSaveModified();
|
||||
|
||||
// Called by framework if created automatically by the default document
|
||||
@@ -198,12 +198,12 @@ public:
|
||||
|
||||
// Called by framework if created automatically by the default document
|
||||
// manager class: gives view a chance to initialise
|
||||
virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return TRUE; };
|
||||
virtual bool OnCreate(wxDocument *WXUNUSED(doc), long WXUNUSED(flags)) { return true; };
|
||||
|
||||
// Checks if the view is the last one for the document; if so, asks user
|
||||
// to confirm save data (if modified). If ok, deletes itself and returns
|
||||
// TRUE.
|
||||
virtual bool Close(bool deleteWindow = TRUE);
|
||||
// true.
|
||||
virtual bool Close(bool deleteWindow = true);
|
||||
|
||||
// Override to do cleanup/veto close
|
||||
virtual bool OnClose(bool deleteWindow);
|
||||
@@ -317,7 +317,7 @@ private:
|
||||
class WXDLLEXPORT wxDocManager: public wxEvtHandler
|
||||
{
|
||||
public:
|
||||
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = TRUE);
|
||||
wxDocManager(long flags = wxDEFAULT_DOCMAN_FLAGS, bool initialize = true);
|
||||
~wxDocManager();
|
||||
|
||||
virtual bool Initialize();
|
||||
@@ -363,11 +363,11 @@ public:
|
||||
virtual bool FlushDoc(wxDocument *doc);
|
||||
virtual wxDocTemplate *MatchTemplate(const wxString& path);
|
||||
virtual wxDocTemplate *SelectDocumentPath(wxDocTemplate **templates,
|
||||
int noTemplates, wxString& path, long flags, bool save = FALSE);
|
||||
int noTemplates, wxString& path, long flags, bool save = false);
|
||||
virtual wxDocTemplate *SelectDocumentType(wxDocTemplate **templates,
|
||||
int noTemplates, bool sort = FALSE);
|
||||
int noTemplates, bool sort = false);
|
||||
virtual wxDocTemplate *SelectViewType(wxDocTemplate **templates,
|
||||
int noTemplates, bool sort = FALSE);
|
||||
int noTemplates, bool sort = false);
|
||||
virtual wxDocTemplate *FindTemplateForPath(const wxString& path);
|
||||
|
||||
void AssociateTemplate(wxDocTemplate *temp);
|
||||
@@ -383,17 +383,17 @@ public:
|
||||
void RemoveDocument(wxDocument *doc);
|
||||
|
||||
// closes all currently open documents
|
||||
bool CloseDocuments(bool force = TRUE);
|
||||
bool CloseDocuments(bool force = true);
|
||||
|
||||
// closes the specified document
|
||||
bool CloseDocument(wxDocument* doc, bool force = FALSE);
|
||||
bool CloseDocument(wxDocument* doc, bool force = false);
|
||||
|
||||
// Clear remaining documents and templates
|
||||
bool Clear(bool force = TRUE);
|
||||
bool Clear(bool force = true);
|
||||
|
||||
// Views or windows should inform the document manager
|
||||
// when a view is going in or out of focus
|
||||
virtual void ActivateView(wxView *view, bool activate = TRUE);
|
||||
virtual void ActivateView(wxView *view, bool activate = true);
|
||||
virtual wxView *GetCurrentView() const;
|
||||
|
||||
wxList& GetDocuments() { return m_docs; }
|
||||
|
@@ -141,7 +141,7 @@ protected: \
|
||||
T& Item(size_t uiIndex) const \
|
||||
{ wxASSERT( uiIndex < size() ); return (T&)operator[](uiIndex); } \
|
||||
\
|
||||
int Index(T e, bool bFromEnd = FALSE) const; \
|
||||
int Index(T e, bool bFromEnd = false) const; \
|
||||
int Index(T lItem, CMPFUNC fnCompare) const; \
|
||||
size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
|
||||
void Add(T lItem, size_t nInsert = 1) \
|
||||
@@ -189,7 +189,7 @@ protected: \
|
||||
{ wxASSERT( uiIndex < m_nCount ); return m_pItems[uiIndex]; } \
|
||||
T& operator[](size_t uiIndex) const { return Item(uiIndex); } \
|
||||
\
|
||||
int Index(T lItem, bool bFromEnd = FALSE) const; \
|
||||
int Index(T lItem, bool bFromEnd = false) const; \
|
||||
int Index(T lItem, CMPFUNC fnCompare) const; \
|
||||
size_t IndexForInsert(T lItem, CMPFUNC fnCompare) const; \
|
||||
void Add(T lItem, size_t nInsert = 1); \
|
||||
@@ -293,7 +293,7 @@ public: \
|
||||
T& Last() const \
|
||||
{ return Item(Count() - 1); } \
|
||||
\
|
||||
int Index(T e, bool bFromEnd = FALSE) const \
|
||||
int Index(T e, bool bFromEnd = false) const \
|
||||
{ return base::Index(e, bFromEnd); } \
|
||||
\
|
||||
void Add(T Item, size_t nInsert = 1) \
|
||||
@@ -313,7 +313,7 @@ public: \
|
||||
}
|
||||
|
||||
#define _WX_DEFINE_TYPEARRAY_PTR(T, name, base, classexp) \
|
||||
_WX_DEFINE_TYPEARRAY(T, name, base, classexp)
|
||||
_WX_DEFINE_TYPEARRAY(T, name, base, classexp)
|
||||
|
||||
#else // if !wxUSE_STL
|
||||
|
||||
@@ -342,7 +342,7 @@ public: \
|
||||
T& Last() const \
|
||||
{ return (T&)(base::operator[](Count() - 1)); } \
|
||||
\
|
||||
int Index(T Item, bool bFromEnd = FALSE) const \
|
||||
int Index(T Item, bool bFromEnd = false) const \
|
||||
{ return base::Index((base_type)Item, bFromEnd); } \
|
||||
\
|
||||
void Add(T Item, size_t nInsert = 1) \
|
||||
@@ -575,7 +575,7 @@ public: \
|
||||
T& Last() const \
|
||||
{ return *(T*)(base::operator[](size() - 1)); } \
|
||||
\
|
||||
int Index(const T& Item, bool bFromEnd = FALSE) const; \
|
||||
int Index(const T& Item, bool bFromEnd = false) const; \
|
||||
\
|
||||
void Add(const T& Item, size_t nInsert = 1); \
|
||||
void Add(const T* pItem) \
|
||||
@@ -789,7 +789,7 @@ private: \
|
||||
#define WX_DECLARE_OBJARRAY_WITH_DECL(T, name, decl) \
|
||||
typedef T _wxObjArray##name; \
|
||||
_WX_DECLARE_OBJARRAY(_wxObjArray##name, name, wxArrayPtrVoid, decl)
|
||||
|
||||
|
||||
#define WX_DECLARE_USER_EXPORTED_OBJARRAY(T, name, expmode) \
|
||||
WX_DECLARE_OBJARRAY_WITH_DECL(T, name, class expmode)
|
||||
|
||||
|
@@ -131,7 +131,7 @@ public:
|
||||
// to use it polymorphically.
|
||||
~wxDynamicLibrary() { Unload(); }
|
||||
|
||||
// return TRUE if the library was loaded successfully
|
||||
// return true if the library was loaded successfully
|
||||
bool IsLoaded() const { return m_handle != 0; }
|
||||
|
||||
// load the library with the given name (full or not), return true if ok
|
||||
@@ -220,11 +220,11 @@ public:
|
||||
which case the library is searched for in all standard locations
|
||||
(use GetDllExt() to construct the filename)
|
||||
|
||||
if success pointer is not NULL, it will be filled with TRUE if everything
|
||||
went ok and FALSE otherwise
|
||||
if success pointer is not NULL, it will be filled with true if everything
|
||||
went ok and false otherwise
|
||||
*/
|
||||
static wxDllType LoadLibrary(const wxString& name, bool *success = NULL);
|
||||
|
||||
|
||||
/*
|
||||
This function unloads the shared library previously loaded with
|
||||
LoadLibrary
|
||||
|
Reference in New Issue
Block a user