Replaced Ok() occurrences with IsOk() throughout trunk.

Additionally renamed wxOSX' private wxNativePrinterDC::Ok() function to IsOk().

Didn't deprecate the various Ok() functions: given the amount of changes already introduced in 3.0 a trivial one like this seems more suitable for after 3.0.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@67681 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Dimitri Schoolwerth
2011-05-03 16:29:04 +00:00
parent ddd7e4307b
commit a1b806b982
322 changed files with 1261 additions and 1260 deletions

View File

@@ -69,7 +69,7 @@ public:
// icon to be shown in the dialog, defaults to the main frame icon
void SetIcon(const wxIcon& icon) { m_icon = icon; }
bool HasIcon() const { return m_icon.Ok(); }
bool HasIcon() const { return m_icon.IsOk(); }
wxIcon GetIcon() const;
// web site for the program and its description (defaults to URL itself if

View File

@@ -112,10 +112,10 @@ public:
void SetHoliday(bool holiday) { m_holiday = holiday; }
// accessors
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasBorderColour() const { return m_colBorder.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasBorderColour() const { return m_colBorder.IsOk(); }
bool HasFont() const { return m_font.IsOk(); }
bool HasBorder() const { return m_border != wxCAL_BORDER_NONE; }
bool IsHoliday() const { return m_holiday; }

View File

@@ -189,7 +189,7 @@ public:
// Is this data OK for showing the print dialog?
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
bool IsOk() const { return m_printData.IsOk() ; }
wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& printData) { m_printData = printData; }
@@ -249,7 +249,7 @@ public:
// Is this data OK for showing the page setup dialog?
bool Ok() const { return IsOk(); }
bool IsOk() const { return m_printData.Ok() ; }
bool IsOk() const { return m_printData.IsOk() ; }
// If a corresponding paper type is found in the paper database, will set the m_printData
// paper size id member as well.

View File

@@ -163,7 +163,7 @@ public:
void SetItalic( bool set ) { m_italic = set; }
// accessors
bool HasColour() const { return m_colour.Ok(); }
bool HasColour() const { return m_colour.IsOk(); }
const wxColour& GetColour() const { return m_colour; }
bool HasFont() const { return m_bold || m_italic; }

View File

@@ -1344,13 +1344,13 @@ public:
~wxDCTextColourChanger()
{
if ( m_colFgOld.Ok() )
if ( m_colFgOld.IsOk() )
m_dc.SetTextForeground(m_colFgOld);
}
void Set(const wxColour& col)
{
if ( !m_colFgOld.Ok() )
if ( !m_colFgOld.IsOk() )
m_colFgOld = m_dc.GetTextForeground();
m_dc.SetTextForeground(col);
}
@@ -1378,7 +1378,7 @@ public:
~wxDCPenChanger()
{
if ( m_penOld.Ok() )
if ( m_penOld.IsOk() )
m_dc.SetPen(m_penOld);
}
@@ -1405,7 +1405,7 @@ public:
~wxDCBrushChanger()
{
if ( m_brushOld.Ok() )
if ( m_brushOld.IsOk() )
m_dc.SetBrush(m_brushOld);
}
@@ -1461,14 +1461,14 @@ public:
void Set(const wxFont& font)
{
if ( !m_fontOld.Ok() )
if ( !m_fontOld.IsOk() )
m_fontOld = m_dc.GetFont();
m_dc.SetFont(font);
}
~wxDCFontChanger()
{
if ( m_fontOld.Ok() )
if ( m_fontOld.IsOk() )
m_dc.SetFont(m_fontOld);
}

View File

@@ -1528,7 +1528,7 @@ public:
void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
const wxCursor& GetCursor() const { return m_cursor; }
bool HasCursor() const { return m_cursor.Ok(); }
bool HasCursor() const { return m_cursor.IsOk(); }
virtual wxEvent *Clone() const { return new wxSetCursorEvent(*this); }

View File

@@ -432,9 +432,9 @@ public:
void SetKind(wxAttrKind kind) { m_attrkind = kind; }
// accessors
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasFont() const { return m_font.IsOk(); }
bool HasAlignment() const
{
return m_hAlign != wxALIGN_INVALID || m_vAlign != wxALIGN_INVALID;

View File

@@ -61,7 +61,7 @@ public:
private:
wxSize GetBitmapSize()
{
return m_bitmap.Ok() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
return m_bitmap.IsOk() ? wxSize(m_bitmap.GetWidth(), m_bitmap.GetHeight())
: wxSize(16, 16); // this is completely arbitrary
}

View File

@@ -52,13 +52,13 @@ extern const gchar *wx_pango_version_check(int major, int minor, int micro);
// helper: use the encoding of the given font if it's valid
inline wxCharBuffer wxConvertToGTK(const wxString& s, const wxFont& font)
{
return wxConvertToGTK(s, font.Ok() ? font.GetEncoding()
return wxConvertToGTK(s, font.IsOk() ? font.GetEncoding()
: wxFONTENCODING_SYSTEM);
}
inline wxCharBuffer wxConvertFromGTK(const wxString& s, const wxFont& font)
{
return wxConvertFromGTK(s, font.Ok() ? font.GetEncoding()
return wxConvertFromGTK(s, font.IsOk() ? font.GetEncoding()
: wxFONTENCODING_SYSTEM);
}

View File

@@ -183,9 +183,9 @@ public:
void SetFont(const wxFont& font) { m_font = font; }
// accessors
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasFont() const { return m_font.IsOk(); }
const wxColour& GetTextColour() const { return m_colText; }
const wxColour& GetBackgroundColour() const { return m_colBack; }

View File

@@ -3644,7 +3644,7 @@ public:
/// image size.
virtual wxTextAttrSize GetNaturalSize() const;
virtual bool IsEmpty() const { return false; /* !m_imageBlock.Ok(); */ }
virtual bool IsEmpty() const { return false; /* !m_imageBlock.IsOk(); */ }
virtual bool CanEditProperties() const { return true; }

View File

@@ -379,8 +379,8 @@ public:
int GetOutlineLevel() const { return m_outlineLevel; }
// accessors
bool HasTextColour() const { return m_colText.Ok() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
bool HasBackgroundColour() const { return m_colBack.Ok() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
bool HasTextColour() const { return m_colText.IsOk() && HasFlag(wxTEXT_ATTR_TEXT_COLOUR) ; }
bool HasBackgroundColour() const { return m_colBack.IsOk() && HasFlag(wxTEXT_ATTR_BACKGROUND_COLOUR) ; }
bool HasAlignment() const { return (m_textAlignment != wxTEXT_ALIGNMENT_DEFAULT) && HasFlag(wxTEXT_ATTR_ALIGNMENT) ; }
bool HasTabs() const { return HasFlag(wxTEXT_ATTR_TABS) ; }
bool HasLeftIndent() const { return HasFlag(wxTEXT_ATTR_LEFT_INDENT); }

View File

@@ -252,9 +252,9 @@ public:
void SetFont(const wxFont& font) { m_font = font; }
// accessors
bool HasTextColour() const { return m_colText.Ok(); }
bool HasBackgroundColour() const { return m_colBack.Ok(); }
bool HasFont() const { return m_font.Ok(); }
bool HasTextColour() const { return m_colText.IsOk(); }
bool HasBackgroundColour() const { return m_colBack.IsOk(); }
bool HasFont() const { return m_font.IsOk(); }
const wxColour& GetTextColour() const { return m_colText; }
const wxColour& GetBackgroundColour() const { return m_colBack; }