Make some member functions const
This commit is contained in:
@@ -185,7 +185,7 @@ public:
|
|||||||
// set this context as the current one
|
// set this context as the current one
|
||||||
virtual bool SetCurrent(const wxGLCanvas& win) const = 0;
|
virtual bool SetCurrent(const wxGLCanvas& win) const = 0;
|
||||||
|
|
||||||
bool IsOK() { return m_isOk; }
|
bool IsOK() const { return m_isOk; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool m_isOk;
|
bool m_isOk;
|
||||||
|
@@ -876,7 +876,7 @@ public:
|
|||||||
virtual void EnableOffset(bool enable = true);
|
virtual void EnableOffset(bool enable = true);
|
||||||
|
|
||||||
void DisableOffset() { EnableOffset(false); }
|
void DisableOffset() { EnableOffset(false); }
|
||||||
bool OffsetEnabled() { return m_enableOffset; }
|
bool OffsetEnabled() const { return m_enableOffset; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
// These fields must be initialized in the derived class ctors.
|
// These fields must be initialized in the derived class ctors.
|
||||||
|
@@ -138,10 +138,10 @@ public:
|
|||||||
bool case_sensitive, bool whole_words_only,
|
bool case_sensitive, bool whole_words_only,
|
||||||
const wxString& book = wxEmptyString);
|
const wxString& book = wxEmptyString);
|
||||||
bool Search(); // do the next iteration
|
bool Search(); // do the next iteration
|
||||||
bool IsActive() { return m_Active; }
|
bool IsActive() const { return m_Active; }
|
||||||
int GetCurIndex() { return m_CurIndex; }
|
int GetCurIndex() const { return m_CurIndex; }
|
||||||
int GetMaxIndex() { return m_MaxIndex; }
|
int GetMaxIndex() const { return m_MaxIndex; }
|
||||||
const wxString& GetName() { return m_Name; }
|
const wxString& GetName() const { return m_Name; }
|
||||||
|
|
||||||
const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; }
|
const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; }
|
||||||
|
|
||||||
|
@@ -222,7 +222,7 @@ public:
|
|||||||
|
|
||||||
void SetScriptMode(wxHtmlScriptMode mode, long previousBase);
|
void SetScriptMode(wxHtmlScriptMode mode, long previousBase);
|
||||||
wxHtmlScriptMode GetScriptMode() const { return m_ScriptMode; }
|
wxHtmlScriptMode GetScriptMode() const { return m_ScriptMode; }
|
||||||
long GetScriptBaseline() { return m_ScriptBaseline; }
|
long GetScriptBaseline() const { return m_ScriptBaseline; }
|
||||||
|
|
||||||
// Formatting cells are not visible on the screen, they only alter
|
// Formatting cells are not visible on the screen, they only alter
|
||||||
// renderer's state.
|
// renderer's state.
|
||||||
|
@@ -55,7 +55,7 @@ public:
|
|||||||
void SetDC(wxDC *dc, double pixel_scale, double font_scale);
|
void SetDC(wxDC *dc, double pixel_scale, double font_scale);
|
||||||
|
|
||||||
wxDC *GetDC() {return m_DC;}
|
wxDC *GetDC() {return m_DC;}
|
||||||
double GetPixelScale() {return m_PixelScale;}
|
double GetPixelScale() const { return m_PixelScale; }
|
||||||
int GetCharHeight() const {return m_CharHeight;}
|
int GetCharHeight() const {return m_CharHeight;}
|
||||||
int GetCharWidth() const {return m_CharWidth;}
|
int GetCharWidth() const {return m_CharWidth;}
|
||||||
|
|
||||||
|
@@ -58,7 +58,7 @@ public:
|
|||||||
virtual ~wxConnectionBase();
|
virtual ~wxConnectionBase();
|
||||||
|
|
||||||
void SetConnected( bool c ) { m_connected = c; }
|
void SetConnected( bool c ) { m_connected = c; }
|
||||||
bool GetConnected() { return m_connected; }
|
bool GetConnected() const { return m_connected; }
|
||||||
|
|
||||||
// Calls that CLIENT can make
|
// Calls that CLIENT can make
|
||||||
bool Execute(const void *data, size_t size, wxIPCFormat fmt = wxIPC_PRIVATE)
|
bool Execute(const void *data, size_t size, wxIPCFormat fmt = wxIPC_PRIVATE)
|
||||||
|
@@ -112,14 +112,14 @@ public:
|
|||||||
wxEdge GetMyEdge() const { return myEdge; }
|
wxEdge GetMyEdge() const { return myEdge; }
|
||||||
void SetEdge(wxEdge which) { myEdge = which; }
|
void SetEdge(wxEdge which) { myEdge = which; }
|
||||||
void SetValue(int v) { value = v; }
|
void SetValue(int v) { value = v; }
|
||||||
int GetMargin() { return margin; }
|
int GetMargin() const { return margin; }
|
||||||
void SetMargin(int m) { margin = m; }
|
void SetMargin(int m) { margin = m; }
|
||||||
int GetValue() const { return value; }
|
int GetValue() const { return value; }
|
||||||
int GetPercent() const { return percent; }
|
int GetPercent() const { return percent; }
|
||||||
int GetOtherEdge() const { return otherEdge; }
|
int GetOtherEdge() const { return otherEdge; }
|
||||||
bool GetDone() const { return done; }
|
bool GetDone() const { return done; }
|
||||||
void SetDone(bool d) { done = d; }
|
void SetDone(bool d) { done = d; }
|
||||||
wxRelationship GetRelationship() { return relationship; }
|
wxRelationship GetRelationship() const { return relationship; }
|
||||||
void SetRelationship(wxRelationship r) { relationship = r; }
|
void SetRelationship(wxRelationship r) { relationship = r; }
|
||||||
|
|
||||||
// Reset constraint if it mentions otherWin
|
// Reset constraint if it mentions otherWin
|
||||||
|
@@ -82,28 +82,28 @@ public:
|
|||||||
void AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h);
|
void AddPaperType(wxPaperSize paperId, int platformId, const wxString& name, int w, int h);
|
||||||
|
|
||||||
// Find by name
|
// Find by name
|
||||||
wxPrintPaperType *FindPaperType(const wxString& name);
|
wxPrintPaperType *FindPaperType(const wxString& name) const;
|
||||||
|
|
||||||
// Find by size id
|
// Find by size id
|
||||||
wxPrintPaperType *FindPaperType(wxPaperSize id);
|
wxPrintPaperType *FindPaperType(wxPaperSize id) const;
|
||||||
|
|
||||||
// Find by platform id
|
// Find by platform id
|
||||||
wxPrintPaperType *FindPaperTypeByPlatformId(int id);
|
wxPrintPaperType *FindPaperTypeByPlatformId(int id) const;
|
||||||
|
|
||||||
// Find by size
|
// Find by size
|
||||||
wxPrintPaperType *FindPaperType(const wxSize& size);
|
wxPrintPaperType *FindPaperType(const wxSize& size) const;
|
||||||
|
|
||||||
// Convert name to size id
|
// Convert name to size id
|
||||||
wxPaperSize ConvertNameToId(const wxString& name);
|
wxPaperSize ConvertNameToId(const wxString& name) const;
|
||||||
|
|
||||||
// Convert size id to name
|
// Convert size id to name
|
||||||
wxString ConvertIdToName(wxPaperSize paperId);
|
wxString ConvertIdToName(wxPaperSize paperId) const;
|
||||||
|
|
||||||
// Get the paper size
|
// Get the paper size
|
||||||
wxSize GetSize(wxPaperSize paperId);
|
wxSize GetSize(wxPaperSize paperId) const;
|
||||||
|
|
||||||
// Get the paper size
|
// Get the paper size
|
||||||
wxPaperSize GetSize(const wxSize& size);
|
wxPaperSize GetSize(const wxSize& size) const;
|
||||||
|
|
||||||
//
|
//
|
||||||
wxPrintPaperType* Item(size_t index) const;
|
wxPrintPaperType* Item(size_t index) const;
|
||||||
|
@@ -167,10 +167,10 @@ public:
|
|||||||
|
|
||||||
// accessors
|
// accessors
|
||||||
// PID of process which terminated
|
// PID of process which terminated
|
||||||
int GetPid() { return m_pid; }
|
int GetPid() const { return m_pid; }
|
||||||
|
|
||||||
// the exit code
|
// the exit code
|
||||||
int GetExitCode() { return m_exitcode; }
|
int GetExitCode() const { return m_exitcode; }
|
||||||
|
|
||||||
// implement the base class pure virtual
|
// implement the base class pure virtual
|
||||||
virtual wxEvent *Clone() const wxOVERRIDE { return new wxProcessEvent(*this); }
|
virtual wxEvent *Clone() const wxOVERRIDE { return new wxProcessEvent(*this); }
|
||||||
|
@@ -1154,7 +1154,7 @@ public:
|
|||||||
virtual void EnableOffset(bool enable = true);
|
virtual void EnableOffset(bool enable = true);
|
||||||
|
|
||||||
void DisableOffset();
|
void DisableOffset();
|
||||||
bool OffsetEnabled();
|
bool OffsetEnabled() const;
|
||||||
|
|
||||||
/** @}
|
/** @}
|
||||||
*/
|
*/
|
||||||
|
@@ -84,14 +84,14 @@ public:
|
|||||||
wxEdge GetMyEdge() const;
|
wxEdge GetMyEdge() const;
|
||||||
void SetEdge(wxEdge which);
|
void SetEdge(wxEdge which);
|
||||||
void SetValue(int v);
|
void SetValue(int v);
|
||||||
int GetMargin();
|
int GetMargin() const;
|
||||||
void SetMargin(int m);
|
void SetMargin(int m);
|
||||||
int GetValue() const;
|
int GetValue() const;
|
||||||
int GetPercent() const;
|
int GetPercent() const;
|
||||||
int GetOtherEdge() const;
|
int GetOtherEdge() const;
|
||||||
bool GetDone() const;
|
bool GetDone() const;
|
||||||
void SetDone(bool d);
|
void SetDone(bool d);
|
||||||
wxRelationship GetRelationship();
|
wxRelationship GetRelationship() const;
|
||||||
void SetRelationship(wxRelationship r);
|
void SetRelationship(wxRelationship r);
|
||||||
|
|
||||||
// Reset constraint if it mentions otherWin
|
// Reset constraint if it mentions otherWin
|
||||||
|
@@ -305,12 +305,12 @@ public:
|
|||||||
/**
|
/**
|
||||||
Returns the exist status.
|
Returns the exist status.
|
||||||
*/
|
*/
|
||||||
int GetExitCode();
|
int GetExitCode() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
Returns the process id.
|
Returns the process id.
|
||||||
*/
|
*/
|
||||||
int GetPid();
|
int GetPid() const;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
@@ -236,7 +236,7 @@ void wxPrintPaperDatabase::AddPaperType(wxPaperSize paperId, int platformId, con
|
|||||||
m_list->push_back(tmp);
|
m_list->push_back(tmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxString& name)
|
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxString& name) const
|
||||||
{
|
{
|
||||||
wxStringToPrintPaperTypeHashMap::iterator it = m_map->find(name);
|
wxStringToPrintPaperTypeHashMap::iterator it = m_map->find(name);
|
||||||
if (it != m_map->end())
|
if (it != m_map->end())
|
||||||
@@ -245,7 +245,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxString& name)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(wxPaperSize id)
|
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(wxPaperSize id) const
|
||||||
{
|
{
|
||||||
typedef wxStringToPrintPaperTypeHashMap::iterator iterator;
|
typedef wxStringToPrintPaperTypeHashMap::iterator iterator;
|
||||||
|
|
||||||
@@ -259,7 +259,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(wxPaperSize id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPrintPaperType *wxPrintPaperDatabase::FindPaperTypeByPlatformId(int id)
|
wxPrintPaperType *wxPrintPaperDatabase::FindPaperTypeByPlatformId(int id) const
|
||||||
{
|
{
|
||||||
typedef wxStringToPrintPaperTypeHashMap::iterator iterator;
|
typedef wxStringToPrintPaperTypeHashMap::iterator iterator;
|
||||||
|
|
||||||
@@ -273,7 +273,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperTypeByPlatformId(int id)
|
|||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxSize& sz)
|
wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxSize& sz) const
|
||||||
{
|
{
|
||||||
// Take the item ordering into account so that the more common types
|
// Take the item ordering into account so that the more common types
|
||||||
// are likely to be taken into account first. This fixes problems with,
|
// are likely to be taken into account first. This fixes problems with,
|
||||||
@@ -291,7 +291,7 @@ wxPrintPaperType *wxPrintPaperDatabase::FindPaperType(const wxSize& sz)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert name to size id
|
// Convert name to size id
|
||||||
wxPaperSize wxPrintPaperDatabase::ConvertNameToId(const wxString& name)
|
wxPaperSize wxPrintPaperDatabase::ConvertNameToId(const wxString& name) const
|
||||||
{
|
{
|
||||||
wxPrintPaperType* type = FindPaperType(name);
|
wxPrintPaperType* type = FindPaperType(name);
|
||||||
if (type)
|
if (type)
|
||||||
@@ -301,7 +301,7 @@ wxPaperSize wxPrintPaperDatabase::ConvertNameToId(const wxString& name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Convert size id to name
|
// Convert size id to name
|
||||||
wxString wxPrintPaperDatabase::ConvertIdToName(wxPaperSize paperId)
|
wxString wxPrintPaperDatabase::ConvertIdToName(wxPaperSize paperId) const
|
||||||
{
|
{
|
||||||
wxPrintPaperType* type = FindPaperType(paperId);
|
wxPrintPaperType* type = FindPaperType(paperId);
|
||||||
if (type)
|
if (type)
|
||||||
@@ -311,7 +311,7 @@ wxString wxPrintPaperDatabase::ConvertIdToName(wxPaperSize paperId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the paper size
|
// Get the paper size
|
||||||
wxSize wxPrintPaperDatabase::GetSize(wxPaperSize paperId)
|
wxSize wxPrintPaperDatabase::GetSize(wxPaperSize paperId) const
|
||||||
{
|
{
|
||||||
wxPrintPaperType* type = FindPaperType(paperId);
|
wxPrintPaperType* type = FindPaperType(paperId);
|
||||||
if (type)
|
if (type)
|
||||||
@@ -321,7 +321,7 @@ wxSize wxPrintPaperDatabase::GetSize(wxPaperSize paperId)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Get the paper size
|
// Get the paper size
|
||||||
wxPaperSize wxPrintPaperDatabase::GetSize(const wxSize& size)
|
wxPaperSize wxPrintPaperDatabase::GetSize(const wxSize& size) const
|
||||||
{
|
{
|
||||||
wxPrintPaperType* type = FindPaperType(size);
|
wxPrintPaperType* type = FindPaperType(size);
|
||||||
if (type)
|
if (type)
|
||||||
|
Reference in New Issue
Block a user