Source cleaning: whitespaces, tabs, ::, -1/wxID_ANY/wxDefaultCoord, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29022 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
a0d9c6cb91
commit
57f4f9255e
@ -46,7 +46,7 @@ public:
|
||||
|
||||
virtual void SetThumbPosition(int viewStart);
|
||||
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
|
||||
bool refresh = TRUE);
|
||||
bool refresh = true);
|
||||
|
||||
// needed for RTTI
|
||||
void SetThumbSize( int s ) { SetScrollbar( GetThumbPosition() , s , GetRange() , GetPageSize() , true ) ; }
|
||||
|
@ -48,7 +48,7 @@ public:
|
||||
|
||||
void GetPosition(int *x, int *y) const;
|
||||
|
||||
bool Show(bool show = TRUE);
|
||||
bool Show(bool show = true);
|
||||
|
||||
void SetRange(int minValue, int maxValue);
|
||||
|
||||
@ -100,7 +100,7 @@ protected:
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
|
||||
DECLARE_DYNAMIC_CLASS_NO_COPY(wxSlider95)
|
||||
};
|
||||
|
||||
|
@ -6,7 +6,7 @@
|
||||
// Created: 01/02/97
|
||||
// RCS-ID: $Id$
|
||||
// Copyright: (c) Julian Smart
|
||||
// Licence: wxWindows licence
|
||||
// Licence: wxWindows licence
|
||||
/////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifndef _WX_SOUND_H_
|
||||
@ -35,12 +35,12 @@ public:
|
||||
bool Create(int size, const wxByte* data);
|
||||
|
||||
bool IsOk() const { return (m_waveData ? true : false); };
|
||||
|
||||
|
||||
static void Stop();
|
||||
|
||||
protected:
|
||||
bool Free();
|
||||
|
||||
|
||||
bool DoPlay(unsigned flags) const;
|
||||
|
||||
private:
|
||||
|
@ -35,7 +35,7 @@ public:
|
||||
wxSpinCtrl() { }
|
||||
|
||||
wxSpinCtrl(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
@ -47,7 +47,7 @@ public:
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
const wxString& value = wxEmptyString,
|
||||
const wxPoint& pos = wxDefaultPosition,
|
||||
const wxSize& size = wxDefaultSize,
|
||||
@ -72,8 +72,8 @@ public:
|
||||
virtual bool SetFont(const wxFont &font);
|
||||
virtual void SetFocus();
|
||||
|
||||
virtual bool Enable(bool enable = TRUE);
|
||||
virtual bool Show(bool show = TRUE);
|
||||
virtual bool Enable(bool enable = true);
|
||||
virtual bool Show(bool show = true);
|
||||
|
||||
// wxSpinButton doesn't accept focus, but we do
|
||||
virtual bool AcceptsFocus() const { return wxWindow::AcceptsFocus(); }
|
||||
|
@ -82,10 +82,10 @@ protected:
|
||||
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const;
|
||||
|
||||
// ctor/dtor helpers
|
||||
void Init() { m_isIcon = TRUE; m_image = NULL; }
|
||||
void Init() { m_isIcon = true; m_image = NULL; }
|
||||
void Free();
|
||||
|
||||
// TRUE if icon/bitmap is valid
|
||||
// true if icon/bitmap is valid
|
||||
bool ImageIsOk() const;
|
||||
|
||||
void SetImage(const wxGDIImage* image);
|
||||
|
@ -45,7 +45,7 @@ public:
|
||||
virtual WXLRESULT MSWWindowProc(WXUINT nMsg, WXWPARAM wParam, WXLPARAM lParam);
|
||||
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
@ -24,7 +24,7 @@ public:
|
||||
// ctors and such
|
||||
wxStatusBar95();
|
||||
wxStatusBar95(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_SIZEGRIP,
|
||||
const wxString& name = wxEmptyString)
|
||||
{
|
||||
@ -32,7 +32,7 @@ public:
|
||||
}
|
||||
|
||||
bool Create(wxWindow *parent,
|
||||
wxWindowID id = -1,
|
||||
wxWindowID id = wxID_ANY,
|
||||
long style = wxST_SIZEGRIP,
|
||||
const wxString& name = wxEmptyString);
|
||||
|
||||
|
@ -43,7 +43,7 @@ public:
|
||||
const wxString &name = wxStaticTextNameStr );
|
||||
|
||||
// overriden base class virtuals
|
||||
virtual bool AcceptsFocus() const { return FALSE; }
|
||||
virtual bool AcceptsFocus() const { return false; }
|
||||
|
||||
protected:
|
||||
// usually overridden base class virtuals
|
||||
|
@ -42,7 +42,7 @@ wxBEGIN_FLAGS( wxScrollBarStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -72,9 +72,9 @@ wxBEGIN_PROPERTIES_TABLE(wxScrollBar)
|
||||
wxEVENT_RANGE_PROPERTY( Scroll , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxScrollEvent )
|
||||
|
||||
wxPROPERTY( ThumbPosition , int , SetThumbPosition, GetThumbPosition, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Range , int , SetRange, GetRange, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( ThumbSize , int , SetThumbSize, GetThumbSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( PageSize , int , SetPageSize, GetPageSize, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY_FLAGS( WindowStyle , wxScrollBarStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
|
||||
wxEND_PROPERTIES_TABLE()
|
||||
|
||||
@ -94,7 +94,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||
const wxString& name)
|
||||
{
|
||||
if (!parent)
|
||||
return FALSE;
|
||||
return false;
|
||||
parent->AddChild(this);
|
||||
SetName(name);
|
||||
#if wxUSE_VALIDATORS
|
||||
@ -108,24 +108,24 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||
SetForegroundColour(parent->GetForegroundColour()) ;
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
m_windowId = (int)NewControlId();
|
||||
else
|
||||
m_windowId = id;
|
||||
if ( id == wxID_ANY )
|
||||
m_windowId = (int)NewControlId();
|
||||
else
|
||||
m_windowId = id;
|
||||
|
||||
int x = pos.x;
|
||||
int y = pos.y;
|
||||
int width = size.x;
|
||||
int height = size.y;
|
||||
int x = pos.x;
|
||||
int y = pos.y;
|
||||
int width = size.x;
|
||||
int height = size.y;
|
||||
|
||||
if (width == -1)
|
||||
if (width == wxDefaultCoord)
|
||||
{
|
||||
if (style & wxHORIZONTAL)
|
||||
width = 140;
|
||||
else
|
||||
width = 14;
|
||||
}
|
||||
if (height == -1)
|
||||
if (height == wxDefaultCoord)
|
||||
{
|
||||
if (style & wxVERTICAL)
|
||||
height = 140;
|
||||
@ -159,7 +159,7 @@ bool wxScrollBar::Create(wxWindow *parent, wxWindowID id,
|
||||
|
||||
SetSize(x, y, width, height);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxScrollBar::~wxScrollBar(void)
|
||||
@ -286,7 +286,7 @@ bool wxScrollBar::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
{
|
||||
// don't process the event if there is no displacement,
|
||||
// unless this is a thumb release or end scroll event.
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
wxScrollEvent event(scrollEvent, m_windowId);
|
||||
|
@ -87,7 +87,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSystemSettingsModule, wxModule)
|
||||
|
||||
bool wxSystemSettingsModule::OnInit()
|
||||
{
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxSystemSettingsModule::OnExit()
|
||||
@ -110,7 +110,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
// is no invalid colour value we use hasCol as the real indicator of
|
||||
// whether colSys was initialized or not
|
||||
COLORREF colSys = 0;
|
||||
bool hasCol = FALSE;
|
||||
bool hasCol = false;
|
||||
|
||||
// the default colours for the entries after BTNHIGHLIGHT
|
||||
static const COLORREF s_defaultSysColors[] =
|
||||
@ -146,7 +146,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
if ( verMaj < 4 )
|
||||
{
|
||||
// NT 3.5
|
||||
useDefault = TRUE;
|
||||
useDefault = true;
|
||||
}
|
||||
else if ( verMaj == 4 )
|
||||
{
|
||||
@ -161,17 +161,17 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
else // >= 5.1
|
||||
{
|
||||
// 5.1 is Windows XP
|
||||
useDefault = FALSE;
|
||||
// Determine if we are using flat menus, only then allow wxSYS_COLOUR_MENUBAR
|
||||
if ( index == wxSYS_COLOUR_MENUBAR )
|
||||
{
|
||||
BOOL isFlat ;
|
||||
if ( SystemParametersInfo( SPI_GETFLATMENU , 0 ,&isFlat, 0 ) )
|
||||
{
|
||||
if ( !isFlat )
|
||||
index = wxSYS_COLOUR_MENU ;
|
||||
}
|
||||
}
|
||||
useDefault = false;
|
||||
// Determine if we are using flat menus, only then allow wxSYS_COLOUR_MENUBAR
|
||||
if ( index == wxSYS_COLOUR_MENUBAR )
|
||||
{
|
||||
BOOL isFlat ;
|
||||
if ( SystemParametersInfo( SPI_GETFLATMENU , 0 ,&isFlat, 0 ) )
|
||||
{
|
||||
if ( !isFlat )
|
||||
index = wxSYS_COLOUR_MENU ;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if ( useDefault )
|
||||
@ -192,7 +192,7 @@ wxColour wxSystemSettingsNative::GetColour(wxSystemColour index)
|
||||
_T("forgot tp update the default colours array") );
|
||||
|
||||
colSys = s_defaultSysColors[n];
|
||||
hasCol = TRUE;
|
||||
hasCol = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -410,12 +410,12 @@ bool wxSystemSettingsNative::HasFeature(wxSystemFeature index)
|
||||
{
|
||||
case wxSYS_CAN_ICONIZE_FRAME:
|
||||
case wxSYS_CAN_DRAW_FRAME_DECORATIONS:
|
||||
return TRUE;
|
||||
return true;
|
||||
|
||||
default:
|
||||
wxFAIL_MSG( _T("unknown system feature") );
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -49,7 +49,7 @@ wxBEGIN_FLAGS( wxSliderStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -578,7 +578,7 @@ void wxSlider95::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
(int) min_len, cy, TRUE);
|
||||
y_offset += cy;
|
||||
|
||||
// slider_length = (total height available) - (height used so far)
|
||||
// slider_length = (total height available) - (height used so far)
|
||||
// - (height of max label) - (border)
|
||||
int slider_length = (int)(h1 - (y_offset-y) - cy - cy);
|
||||
|
||||
@ -628,18 +628,18 @@ wxSize wxSlider95::DoGetBestSize() const
|
||||
{
|
||||
wxSize rv;
|
||||
wxChar buf[300];
|
||||
int cx;
|
||||
int cx;
|
||||
int cy;
|
||||
int cyf;
|
||||
int min_len = 0;
|
||||
int max_len = 0;
|
||||
|
||||
|
||||
wxGetCharSize(GetHWND(), &cx, &cy, this->GetFont());
|
||||
|
||||
|
||||
if ( !HasFlag(wxSL_VERTICAL))
|
||||
{
|
||||
rv = wxSize(100, 20); // default size for the slider itself
|
||||
|
||||
|
||||
if (HasFlag(wxSL_LABELS)) // do we need to add more for the labels?
|
||||
{
|
||||
::GetWindowText((HWND) m_staticMin, buf, 300);
|
||||
@ -654,7 +654,7 @@ wxSize wxSlider95::DoGetBestSize() const
|
||||
{
|
||||
int new_width = (int)(wxMax(min_len, max_len));
|
||||
int valueHeight = (int)cyf;
|
||||
|
||||
|
||||
#ifdef __WIN32__
|
||||
// For some reason, under Win95, the text edit control has
|
||||
// a lot of space before the first character
|
||||
@ -682,7 +682,7 @@ wxSize wxSlider95::DoGetBestSize() const
|
||||
::GetWindowText((HWND) m_staticMax, buf, 300);
|
||||
GetTextExtent(buf, &max_len, &cyf);
|
||||
rv.y += cy;
|
||||
|
||||
|
||||
if (m_staticValue)
|
||||
{
|
||||
int new_width = (int)(wxMax(min_len, max_len));
|
||||
@ -694,7 +694,7 @@ wxSize wxSlider95::DoGetBestSize() const
|
||||
valueHeight = (int) (valueHeight * 1.5) ;
|
||||
rv.y += valueHeight;
|
||||
rv.x = wxMax(new_width, rv.x);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return rv;
|
||||
|
@ -69,7 +69,7 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
|
||||
m_lineSize = 1;
|
||||
m_windowStyle = style;
|
||||
|
||||
if ( id == -1 )
|
||||
if ( id == wxID_ANY )
|
||||
m_windowId = (int)NewControlId();
|
||||
else
|
||||
m_windowId = id;
|
||||
@ -158,7 +158,7 @@ bool wxSliderMSW::Create(wxWindow *parent, wxWindowID id,
|
||||
SetSize(x, y, width, height);
|
||||
SetValue(value);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxSliderMSW::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
@ -217,7 +217,7 @@ bool wxSliderMSW::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
if (nScrollInc == 0)
|
||||
{
|
||||
// no event...
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
int newPos = position + nScrollInc;
|
||||
@ -225,7 +225,7 @@ bool wxSliderMSW::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
if ( (newPos < GetMin()) || (newPos > GetMax()) )
|
||||
{
|
||||
// out of range - but we did process it
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
SetValue(newPos);
|
||||
@ -333,9 +333,9 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
|
||||
int currentX, currentY;
|
||||
GetPosition(¤tX, ¤tY);
|
||||
if (x == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
if (x == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
x1 = currentX;
|
||||
if (y == -1 && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
if (y == wxDefaultCoord && !(sizeFlags & wxSIZE_ALLOW_MINUS_ONE))
|
||||
y1 = currentY;
|
||||
|
||||
AdjustForParentClientOrigin(x1, y1, sizeFlags);
|
||||
@ -373,11 +373,11 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
// a lot of space before the first character
|
||||
new_width += 3*cx;
|
||||
#endif
|
||||
MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE);
|
||||
::MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE);
|
||||
x_offset += new_width + cx;
|
||||
}
|
||||
|
||||
MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE);
|
||||
::MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE);
|
||||
x_offset += (int)(min_len + cx);
|
||||
|
||||
int slider_length = (int)(w1 - x_offset - max_len - cx);
|
||||
@ -388,10 +388,10 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
if (slider_length < 100)
|
||||
slider_length = 100;
|
||||
|
||||
MoveWindow(GetHwnd(), x_offset, y_offset, slider_length, slider_height, TRUE);
|
||||
::MoveWindow(GetHwnd(), x_offset, y_offset, slider_length, slider_height, TRUE);
|
||||
x_offset += slider_length + cx;
|
||||
|
||||
MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE);
|
||||
::MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -400,7 +400,7 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
w1 = 200;
|
||||
if ( h1 < 0 )
|
||||
h1 = 20;
|
||||
MoveWindow(GetHwnd(), x1, y1, w1, h1, TRUE);
|
||||
::MoveWindow(GetHwnd(), x1, y1, w1, h1, TRUE);
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -428,11 +428,11 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
... and replace with following line: */
|
||||
new_width += cx;
|
||||
|
||||
MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE);
|
||||
::MoveWindow((HWND) m_staticValue, x_offset, y_offset, new_width, valueHeight, TRUE);
|
||||
y_offset += valueHeight;
|
||||
}
|
||||
|
||||
MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE);
|
||||
::MoveWindow((HWND) m_staticMin, x_offset, y_offset, (int)min_len, cy, TRUE);
|
||||
y_offset += cy;
|
||||
|
||||
int slider_length = (int)(h1 - y_offset - cy - cy);
|
||||
@ -444,10 +444,10 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
if (slider_length < 100)
|
||||
slider_length = 100;
|
||||
|
||||
MoveWindow(GetHwnd(), x_offset, y_offset, slider_width, slider_length, TRUE);
|
||||
::MoveWindow(GetHwnd(), x_offset, y_offset, slider_width, slider_length, TRUE);
|
||||
y_offset += slider_length;
|
||||
|
||||
MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE);
|
||||
::MoveWindow((HWND) m_staticMax, x_offset, y_offset, (int)max_len, cy, TRUE);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -456,7 +456,7 @@ void wxSliderMSW::DoSetSize(int x, int y, int width, int height, int sizeFlags)
|
||||
w1 = 20;
|
||||
if ( h1 < 0 )
|
||||
h1 = 200;
|
||||
MoveWindow(GetHwnd(), x1, y1, w1, h1, TRUE);
|
||||
::MoveWindow(GetHwnd(), x1, y1, w1, h1, TRUE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -549,7 +549,7 @@ bool wxSliderMSW::Show(bool show)
|
||||
ShowWindow((HWND) m_staticMin, (BOOL)cshow);
|
||||
if(m_staticMax)
|
||||
ShowWindow((HWND) m_staticMax, (BOOL)cshow);
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@ -61,18 +61,18 @@ public:
|
||||
{
|
||||
wxLogLastError(_T("CreateMutex"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
// mutex was either created or opened - see what really happened
|
||||
m_wasOpened = ::GetLastError() == ERROR_ALREADY_EXISTS;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool WasOpened() const
|
||||
{
|
||||
wxCHECK_MSG( m_hMutex, FALSE,
|
||||
wxCHECK_MSG( m_hMutex, false,
|
||||
_T("can't be called if mutex creation failed") );
|
||||
|
||||
return m_wasOpened;
|
||||
@ -119,7 +119,7 @@ bool wxSingleInstanceChecker::Create(const wxString& name,
|
||||
|
||||
bool wxSingleInstanceChecker::IsAnotherRunning() const
|
||||
{
|
||||
wxCHECK_MSG( m_impl, FALSE, _T("must call Create() first") );
|
||||
wxCHECK_MSG( m_impl, false, _T("must call Create() first") );
|
||||
|
||||
// if the mutex had been opened, another instance is running - otherwise we
|
||||
// would have created it
|
||||
|
@ -66,7 +66,7 @@ bool wxSound::Create(const wxString& fileName, bool isResource)
|
||||
|
||||
if (isResource)
|
||||
{
|
||||
m_isResource = TRUE;
|
||||
m_isResource = true;
|
||||
|
||||
HRSRC hresInfo;
|
||||
hresInfo = ::FindResource((HMODULE) wxhInstance, fileName, wxT("WAVE"));
|
||||
|
@ -68,7 +68,7 @@ wxBEGIN_FLAGS( wxSpinButtonStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -108,7 +108,7 @@ wxEND_PROPERTIES_TABLE()
|
||||
wxBEGIN_HANDLERS_TABLE(wxSpinButton)
|
||||
wxEND_HANDLERS_TABLE()
|
||||
|
||||
wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
#else
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl)
|
||||
#endif
|
||||
@ -270,7 +270,7 @@ void wxSpinButton::SetRange(int minVal, int maxVal)
|
||||
bool wxSpinButton::MSWOnScroll(int WXUNUSED(orientation), WXWORD wParam,
|
||||
WXWORD pos, WXHWND control)
|
||||
{
|
||||
wxCHECK_MSG( control, FALSE, wxT("scrolling what?") )
|
||||
wxCHECK_MSG( control, false, wxT("scrolling what?") )
|
||||
|
||||
if ( wParam != SB_THUMBPOSITION )
|
||||
{
|
||||
|
@ -62,7 +62,7 @@ wxBEGIN_FLAGS( wxSpinCtrlStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -93,24 +93,24 @@ IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinCtrl, wxControl,"wx/spinbut.h")
|
||||
wxBEGIN_PROPERTIES_TABLE(wxSpinCtrl)
|
||||
wxEVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent )
|
||||
wxEVENT_PROPERTY( Updated , wxEVT_COMMAND_SPINCTRL_UPDATED , wxCommandEvent )
|
||||
wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
|
||||
wxEVENT_PROPERTY( TextUpdated , wxEVT_COMMAND_TEXT_UPDATED , wxCommandEvent )
|
||||
wxEVENT_PROPERTY( TextEnter , wxEVT_COMMAND_TEXT_ENTER , wxCommandEvent )
|
||||
|
||||
wxPROPERTY( ValueString , wxString , SetValue , GetValue , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) ;
|
||||
wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Min , int , SetMin, GetMin, 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
|
||||
wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Min , int , SetMin, GetMin, 0, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
|
||||
wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY_FLAGS( WindowStyle , wxSpinCtrlStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
|
||||
/*
|
||||
TODO PROPERTIES
|
||||
style wxSP_ARROW_KEYS
|
||||
TODO PROPERTIES
|
||||
style wxSP_ARROW_KEYS
|
||||
*/
|
||||
wxEND_PROPERTIES_TABLE()
|
||||
|
||||
wxBEGIN_HANDLERS_TABLE(wxSpinCtrl)
|
||||
wxEND_HANDLERS_TABLE()
|
||||
|
||||
wxCONSTRUCTOR_6( wxSpinCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , ValueString , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
wxCONSTRUCTOR_6( wxSpinCtrl , wxWindow* , Parent , wxWindowID , Id , wxString , ValueString , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
#else
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
|
||||
#endif
|
||||
@ -120,7 +120,7 @@ BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
|
||||
|
||||
EVT_SET_FOCUS(wxSpinCtrl::OnSetFocus)
|
||||
|
||||
EVT_SPIN(-1, wxSpinCtrl::OnSpinChange)
|
||||
EVT_SPIN(wxID_ANY, wxSpinCtrl::OnSpinChange)
|
||||
END_EVENT_TABLE()
|
||||
|
||||
#define GetBuddyHwnd() (HWND)(m_hwndBuddy)
|
||||
@ -228,7 +228,7 @@ bool wxSpinCtrl::ProcessTextCommand(WXWORD cmd, WXWORD WXUNUSED(id))
|
||||
}
|
||||
|
||||
// not processed
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
void wxSpinCtrl::OnChar(wxKeyEvent& event)
|
||||
@ -352,14 +352,14 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
||||
{
|
||||
wxLogLastError(wxT("CreateWindow(buddy text window)"));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
// create the spin button
|
||||
if ( !wxSpinButton::Create(parent, id, posBtn, sizeBtn, style, name) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetRange(min, max);
|
||||
@ -401,7 +401,7 @@ bool wxSpinCtrl::Create(wxWindow *parent,
|
||||
// initial wxEVT_COMMAND_TEXT_UPDATED message
|
||||
ms_allSpins.Add(this);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxSpinCtrl::~wxSpinCtrl()
|
||||
@ -461,37 +461,37 @@ bool wxSpinCtrl::SetFont(const wxFont& font)
|
||||
if ( !wxWindowBase::SetFont(font) )
|
||||
{
|
||||
// nothing to do
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
WXHANDLE hFont = GetFont().GetResourceHandle();
|
||||
(void)::SendMessage(GetBuddyHwnd(), WM_SETFONT, (WPARAM)hFont, TRUE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxSpinCtrl::Show(bool show)
|
||||
{
|
||||
if ( !wxControl::Show(show) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
::ShowWindow(GetBuddyHwnd(), show ? SW_SHOW : SW_HIDE);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool wxSpinCtrl::Enable(bool enable)
|
||||
{
|
||||
if ( !wxControl::Enable(enable) )
|
||||
{
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
::EnableWindow(GetBuddyHwnd(), enable);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxSpinCtrl::SetFocus()
|
||||
@ -534,7 +534,7 @@ wxSize wxSpinCtrl::DoGetBestSize() const
|
||||
// from above, because otherwise we'll get a spin control
|
||||
// that's too big. So never use the height calculated
|
||||
// from wxSpinButton::DoGetBestSize().
|
||||
|
||||
|
||||
// if ( sizeBtn.y < y )
|
||||
{
|
||||
// make the text tall enough
|
||||
|
@ -56,7 +56,7 @@ wxBEGIN_FLAGS( wxStaticBitmapStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -93,8 +93,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticBitmap, wxControl)
|
||||
#endif
|
||||
|
||||
/*
|
||||
TODO PROPERTIES :
|
||||
bitmap
|
||||
TODO PROPERTIES :
|
||||
bitmap
|
||||
*/
|
||||
|
||||
// ===========================================================================
|
||||
@ -146,7 +146,7 @@ bool wxStaticBitmap::Create(wxWindow *parent,
|
||||
const wxString& name)
|
||||
{
|
||||
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// we may have either bitmap or icon: if a bitmap with mask is passed, we
|
||||
// will transform it to an icon ourselves because otherwise the mask will
|
||||
@ -168,8 +168,8 @@ bool wxStaticBitmap::Create(wxWindow *parent,
|
||||
|
||||
// GetBestSize will work properly now, so set the best size if needed
|
||||
SetBestSize(size);
|
||||
|
||||
return TRUE;
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
wxBorder wxStaticBitmap::GetDefaultBorder() const
|
||||
@ -259,7 +259,7 @@ void wxStaticBitmap::SetImageNoCopy( wxGDIImage* image)
|
||||
rect.top = y;
|
||||
rect.right = x + w;
|
||||
rect.bottom = y + h;
|
||||
InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);
|
||||
::InvalidateRect(GetHwndOf(GetParent()), &rect, TRUE);
|
||||
}
|
||||
|
||||
// We need this or the control can never be moved e.g. in Dialog Editor.
|
||||
|
@ -55,7 +55,7 @@ wxBEGIN_FLAGS( wxStaticBoxStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -79,18 +79,18 @@ wxEND_FLAGS( wxStaticBoxStyle )
|
||||
IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticBox, wxControl,"wx/statbox.h")
|
||||
|
||||
wxBEGIN_PROPERTIES_TABLE(wxStaticBox)
|
||||
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY_FLAGS( WindowStyle , wxStaticBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
|
||||
/*
|
||||
TODO PROPERTIES :
|
||||
label
|
||||
TODO PROPERTIES :
|
||||
label
|
||||
*/
|
||||
wxEND_PROPERTIES_TABLE()
|
||||
|
||||
wxBEGIN_HANDLERS_TABLE(wxStaticBox)
|
||||
wxEND_HANDLERS_TABLE()
|
||||
|
||||
wxCONSTRUCTOR_6( wxStaticBox , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
wxCONSTRUCTOR_6( wxStaticBox , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
#else
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticBox, wxControl)
|
||||
#endif
|
||||
@ -112,7 +112,7 @@ bool wxStaticBox::Create(wxWindow *parent,
|
||||
const wxString& name)
|
||||
{
|
||||
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// as wxStaticBox doesn't draw its own background, we make it transparent
|
||||
// to force redrawing its background which could have been overwritten by
|
||||
@ -132,12 +132,12 @@ bool wxStaticBox::Create(wxWindow *parent,
|
||||
WS_EX_TRANSPARENT
|
||||
#endif
|
||||
) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// to be transparent we should have the same colour as the parent as well
|
||||
SetBackgroundColour(GetParent()->GetBackgroundColour());
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxSize wxStaticBox::DoGetBestSize() const
|
||||
|
@ -70,7 +70,7 @@ bool wxStatusBar95::Create(wxWindow *parent,
|
||||
long style,
|
||||
const wxString& name)
|
||||
{
|
||||
wxCHECK_MSG( parent, FALSE, wxT("status bar must have a parent") );
|
||||
wxCHECK_MSG( parent, false, wxT("status bar must have a parent") );
|
||||
|
||||
SetName(name);
|
||||
SetWindowStyleFlag(style);
|
||||
@ -78,7 +78,7 @@ bool wxStatusBar95::Create(wxWindow *parent,
|
||||
|
||||
parent->AddChild(this);
|
||||
|
||||
m_windowId = id == -1 ? NewControlId() : id;
|
||||
m_windowId = id == wxID_ANY ? NewControlId() : id;
|
||||
|
||||
DWORD wstyle = WS_CHILD | WS_VISIBLE;
|
||||
|
||||
@ -111,7 +111,7 @@ bool wxStatusBar95::Create(wxWindow *parent,
|
||||
{
|
||||
wxLogSysError(_("Failed to create a status bar."));
|
||||
|
||||
return FALSE;
|
||||
return false;
|
||||
}
|
||||
|
||||
SetFieldsCount(1);
|
||||
@ -120,7 +120,7 @@ bool wxStatusBar95::Create(wxWindow *parent,
|
||||
|
||||
SetBackgroundColour(wxSystemSettings::GetColour(wxSYS_COLOUR_MENUBAR));
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxStatusBar95::~wxStatusBar95()
|
||||
@ -247,7 +247,7 @@ void wxStatusBar95::SetMinHeight(int height)
|
||||
|
||||
bool wxStatusBar95::GetFieldRect(int i, wxRect& rect) const
|
||||
{
|
||||
wxCHECK_MSG( (i >= 0) && (i < m_nFields), FALSE,
|
||||
wxCHECK_MSG( (i >= 0) && (i < m_nFields), false,
|
||||
_T("invalid statusbar field index") );
|
||||
|
||||
RECT r;
|
||||
@ -258,7 +258,7 @@ bool wxStatusBar95::GetFieldRect(int i, wxRect& rect) const
|
||||
|
||||
wxCopyRECTToRect(r, rect);
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height)
|
||||
@ -279,7 +279,7 @@ void wxStatusBar95::DoMoveWindow(int x, int y, int width, int height)
|
||||
// adjust fields widths to the new size
|
||||
SetFieldsWidth();
|
||||
|
||||
// we have to trigger wxSizeEvent if there are children window in status
|
||||
// we have to trigger wxSizeEvent if there are children window in status
|
||||
// bar because GetFieldRect returned incorrect (not updated) values up to
|
||||
// here, which almost certainly resulted in incorrectly redrawn statusbar
|
||||
if ( m_children.GetCount() > 0 )
|
||||
|
@ -58,7 +58,7 @@ wxBEGIN_FLAGS( wxStaticLineStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -98,8 +98,8 @@ IMPLEMENT_DYNAMIC_CLASS(wxStaticLine, wxControl)
|
||||
#endif
|
||||
|
||||
/*
|
||||
TODO PROPERTIES :
|
||||
style (wxLI_HORIZONTAL)
|
||||
TODO PROPERTIES :
|
||||
style (wxLI_HORIZONTAL)
|
||||
*/
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
@ -116,7 +116,7 @@ bool wxStaticLine::Create(wxWindow *parent,
|
||||
wxSize size = AdjustSize(sizeOrig);
|
||||
|
||||
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return MSWCreateControl(_T("STATIC"), wxEmptyString, pos, size);
|
||||
}
|
||||
|
@ -44,7 +44,7 @@ wxBEGIN_FLAGS( wxStaticTextStyle )
|
||||
wxFLAGS_MEMBER(wxBORDER_RAISED)
|
||||
wxFLAGS_MEMBER(wxBORDER_STATIC)
|
||||
wxFLAGS_MEMBER(wxBORDER_NONE)
|
||||
|
||||
|
||||
// old style border flags
|
||||
wxFLAGS_MEMBER(wxSIMPLE_BORDER)
|
||||
wxFLAGS_MEMBER(wxSUNKEN_BORDER)
|
||||
@ -73,14 +73,14 @@ wxEND_FLAGS( wxStaticTextStyle )
|
||||
IMPLEMENT_DYNAMIC_CLASS_XTI(wxStaticText, wxControl,"wx/stattext.h")
|
||||
|
||||
wxBEGIN_PROPERTIES_TABLE(wxStaticText)
|
||||
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY( Label,wxString, SetLabel, GetLabel, wxString() , 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
|
||||
wxPROPERTY_FLAGS( WindowStyle , wxStaticTextStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
|
||||
wxEND_PROPERTIES_TABLE()
|
||||
|
||||
wxBEGIN_HANDLERS_TABLE(wxStaticText)
|
||||
wxEND_HANDLERS_TABLE()
|
||||
|
||||
wxCONSTRUCTOR_6( wxStaticText , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
wxCONSTRUCTOR_6( wxStaticText , wxWindow* , Parent , wxWindowID , Id , wxString , Label , wxPoint , Position , wxSize , Size , long , WindowStyle )
|
||||
#else
|
||||
IMPLEMENT_DYNAMIC_CLASS(wxStaticText, wxControl)
|
||||
#endif
|
||||
@ -94,12 +94,12 @@ bool wxStaticText::Create(wxWindow *parent,
|
||||
const wxString& name)
|
||||
{
|
||||
if ( !CreateControl(parent, id, pos, size, style, wxDefaultValidator, name) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
if ( !MSWCreateControl(wxT("STATIC"), label, pos, size) )
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
wxBorder wxStaticText::GetDefaultBorder() const
|
||||
@ -132,7 +132,7 @@ wxSize wxStaticText::DoGetBestSize() const
|
||||
int widthTextMax = 0, widthLine,
|
||||
heightTextTotal = 0, heightLineDefault = 0, heightLine = 0;
|
||||
|
||||
bool lastWasAmpersand = FALSE;
|
||||
bool lastWasAmpersand = false;
|
||||
|
||||
wxString curLine;
|
||||
for ( const wxChar *pc = text; ; pc++ )
|
||||
@ -179,14 +179,14 @@ wxSize wxStaticText::DoGetBestSize() const
|
||||
{
|
||||
if ( !lastWasAmpersand )
|
||||
{
|
||||
lastWasAmpersand = TRUE;
|
||||
lastWasAmpersand = true;
|
||||
|
||||
// skip the statement adding pc to curLine below
|
||||
continue;
|
||||
}
|
||||
|
||||
// it is a literal ampersand
|
||||
lastWasAmpersand = FALSE;
|
||||
lastWasAmpersand = false;
|
||||
}
|
||||
|
||||
curLine += *pc;
|
||||
@ -216,7 +216,8 @@ void wxStaticText::SetLabel(const wxString& label)
|
||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||
{
|
||||
InvalidateBestSize();
|
||||
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
DoSetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord,
|
||||
wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
}
|
||||
}
|
||||
|
||||
@ -230,7 +231,8 @@ bool wxStaticText::SetFont(const wxFont& font)
|
||||
if ( !(GetWindowStyle() & wxST_NO_AUTORESIZE) )
|
||||
{
|
||||
InvalidateBestSize();
|
||||
DoSetSize(-1, -1, -1, -1, wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
DoSetSize(wxDefaultCoord, wxDefaultCoord, wxDefaultCoord, wxDefaultCoord,
|
||||
wxSIZE_AUTO_WIDTH | wxSIZE_AUTO_HEIGHT);
|
||||
}
|
||||
|
||||
return ret;
|
||||
|
Loading…
Reference in New Issue
Block a user