some wxUSE_* macros not used consistently (patch #992456) with source cleaning (blind changes).
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@28975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,6 +14,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_CHOICE
|
||||||
|
|
||||||
#include "wx/choice.h"
|
#include "wx/choice.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
@@ -60,7 +63,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
m_macIsUserPane = FALSE ;
|
m_macIsUserPane = false ;
|
||||||
|
|
||||||
if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) )
|
if ( !wxChoiceBase::Create(parent, id, pos, size, style, validator, name) )
|
||||||
return false;
|
return false;
|
||||||
@@ -82,7 +85,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
Append(choices[i]);
|
Append(choices[i]);
|
||||||
}
|
}
|
||||||
SetBestSize(size); // Needed because it is a wxControlWithItems
|
SetBestSize(size); // Needed because it is a wxControlWithItems
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -178,7 +181,7 @@ int wxChoice::FindString(const wxString& s) const
|
|||||||
{
|
{
|
||||||
for( int i = 0 ; i < GetCount() ; i++ )
|
for( int i = 0 ; i < GetCount() ; i++ )
|
||||||
{
|
{
|
||||||
if ( GetString( i ).IsSameAs(s, FALSE) )
|
if ( GetString( i ).IsSameAs(s, false) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
return wxNOT_FOUND ;
|
return wxNOT_FOUND ;
|
||||||
@@ -299,3 +302,5 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
}
|
}
|
||||||
return wxSize(lbWidth, lbHeight);
|
return wxSize(lbWidth, lbHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_CHOICE
|
||||||
|
@@ -13,6 +13,10 @@
|
|||||||
#pragma implementation "slider.h"
|
#pragma implementation "slider.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SLIDER
|
||||||
|
|
||||||
#include "wx/slider.h"
|
#include "wx/slider.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
@@ -57,7 +61,7 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxValidator& validator,
|
const wxValidator& validator,
|
||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
m_macIsUserPane = FALSE ;
|
m_macIsUserPane = false ;
|
||||||
|
|
||||||
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
if ( !wxControl::Create(parent, id, pos, size, style, validator, name) )
|
||||||
return false;
|
return false;
|
||||||
@@ -102,9 +106,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if(style & wxSL_LABELS)
|
if(style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
m_macMinimumStatic = new wxStaticText( parent, -1, wxEmptyString );
|
m_macMinimumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
|
||||||
m_macMaximumStatic = new wxStaticText( parent, -1, wxEmptyString );
|
m_macMaximumStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
|
||||||
m_macValueStatic = new wxStaticText( parent, -1, wxEmptyString );
|
m_macValueStatic = new wxStaticText( parent, wxID_ANY, wxEmptyString );
|
||||||
SetRange(minValue, maxValue);
|
SetRange(minValue, maxValue);
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
}
|
}
|
||||||
@@ -424,3 +428,5 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
wxControl::DoMoveWindow(x,y,width,height) ;
|
wxControl::DoMoveWindow(x,y,width,height) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SLIDER
|
||||||
|
@@ -14,6 +14,10 @@
|
|||||||
#pragma implementation "spinbuttbase.h"
|
#pragma implementation "spinbuttbase.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SPINBTN
|
||||||
|
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
@@ -40,7 +44,7 @@ wxSpinButton::wxSpinButton()
|
|||||||
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, const wxSize& size,
|
||||||
long style, const wxString& name)
|
long style, const wxString& name)
|
||||||
{
|
{
|
||||||
m_macIsUserPane = FALSE ;
|
m_macIsUserPane = false ;
|
||||||
|
|
||||||
if ( !wxSpinButtonBase::Create(parent, id, pos, size,
|
if ( !wxSpinButtonBase::Create(parent, id, pos, size,
|
||||||
style, wxDefaultValidator, name) )
|
style, wxDefaultValidator, name) )
|
||||||
@@ -50,7 +54,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
m_max = 100;
|
m_max = 100;
|
||||||
|
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
|
Rect bounds = wxMacGetBoundsForControl( this , pos , size ) ;
|
||||||
|
|
||||||
@@ -61,7 +65,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
m_peer->SetActionProc( wxMacLiveScrollbarActionUPP ) ;
|
m_peer->SetActionProc( wxMacLiveScrollbarActionUPP ) ;
|
||||||
MacPostControlCreate(pos,size) ;
|
MacPostControlCreate(pos,size) ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSpinButton::~wxSpinButton()
|
wxSpinButton::~wxSpinButton()
|
||||||
@@ -198,3 +202,4 @@ wxSize wxSpinButton::DoGetBestSize() const
|
|||||||
return wxSize(16,24);
|
return wxSize(16,24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SPINBTN
|
||||||
|
@@ -14,6 +14,9 @@
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_CHOICE
|
||||||
|
|
||||||
#include "wx/choice.h"
|
#include "wx/choice.h"
|
||||||
#include "wx/menu.h"
|
#include "wx/menu.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
@@ -82,7 +85,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
{
|
{
|
||||||
Append(choices[i]);
|
Append(choices[i]);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -178,7 +181,7 @@ int wxChoice::FindString(const wxString& s) const
|
|||||||
{
|
{
|
||||||
for( int i = 0 ; i < GetCount() ; i++ )
|
for( int i = 0 ; i < GetCount() ; i++ )
|
||||||
{
|
{
|
||||||
if ( GetString( i ).IsSameAs(s, FALSE) )
|
if ( GetString( i ).IsSameAs(s, false) )
|
||||||
return i ;
|
return i ;
|
||||||
}
|
}
|
||||||
return wxNOT_FOUND ;
|
return wxNOT_FOUND ;
|
||||||
@@ -298,3 +301,5 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
}
|
}
|
||||||
return wxSize(lbWidth, lbHeight);
|
return wxSize(lbWidth, lbHeight);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_CHOICE
|
||||||
|
@@ -13,6 +13,10 @@
|
|||||||
#pragma implementation "slider.h"
|
#pragma implementation "slider.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SLIDER
|
||||||
|
|
||||||
#include "wx/slider.h"
|
#include "wx/slider.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
@@ -95,9 +99,9 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if(style & wxSL_LABELS)
|
if(style & wxSL_LABELS)
|
||||||
{
|
{
|
||||||
m_macMinimumStatic = new wxStaticText( this, -1, wxEmptyString );
|
m_macMinimumStatic = new wxStaticText( this, wxID_ANY, wxEmptyString );
|
||||||
m_macMaximumStatic = new wxStaticText( this, -1, wxEmptyString );
|
m_macMaximumStatic = new wxStaticText( this, wxID_ANY, wxEmptyString );
|
||||||
m_macValueStatic = new wxStaticText( this, -1, wxEmptyString );
|
m_macValueStatic = new wxStaticText( this, wxID_ANY, wxEmptyString );
|
||||||
SetRange(minValue, maxValue);
|
SetRange(minValue, maxValue);
|
||||||
SetValue(value);
|
SetValue(value);
|
||||||
}
|
}
|
||||||
@@ -431,3 +435,5 @@ void wxSlider::DoMoveWindow(int x, int y, int width, int height)
|
|||||||
{
|
{
|
||||||
wxControl::DoMoveWindow(x,y,width,height) ;
|
wxControl::DoMoveWindow(x,y,width,height) ;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SLIDER
|
||||||
|
@@ -14,6 +14,10 @@
|
|||||||
#pragma implementation "spinbuttbase.h"
|
#pragma implementation "spinbuttbase.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SPINBTN
|
||||||
|
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
#include "wx/mac/uma.h"
|
#include "wx/mac/uma.h"
|
||||||
|
|
||||||
@@ -46,7 +50,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
m_max = 100;
|
m_max = 100;
|
||||||
|
|
||||||
if (!parent)
|
if (!parent)
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Rect bounds ;
|
Rect bounds ;
|
||||||
Str255 title ;
|
Str255 title ;
|
||||||
@@ -60,7 +64,7 @@ bool wxSpinButton::Create(wxWindow *parent, wxWindowID id, const wxPoint& pos, c
|
|||||||
|
|
||||||
MacPostControlCreate() ;
|
MacPostControlCreate() ;
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSpinButton::~wxSpinButton()
|
wxSpinButton::~wxSpinButton()
|
||||||
@@ -180,3 +184,4 @@ wxSize wxSpinButton::DoGetBestSize() const
|
|||||||
return wxSize(16,24);
|
return wxSize(16,24);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SPINBTN
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
|
|
||||||
#include "wx/defs.h"
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_CHOICE
|
||||||
|
|
||||||
#include "wx/choice.h"
|
#include "wx/choice.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/arrstr.h"
|
#include "wx/arrstr.h"
|
||||||
@@ -71,7 +73,7 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
const wxString& name)
|
const wxString& name)
|
||||||
{
|
{
|
||||||
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
if ( !CreateControl(parent, id, pos, size, style, validator, name) )
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
Widget parentWidget = (Widget) parent->GetClientWidget();
|
Widget parentWidget = (Widget) parent->GetClientWidget();
|
||||||
|
|
||||||
@@ -138,13 +140,13 @@ bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
|
XtVaSetValues((Widget) m_formWidget, XmNresizePolicy, XmRESIZE_NONE, NULL);
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
AttachWidget (parent, m_buttonWidget, m_formWidget,
|
AttachWidget (parent, m_buttonWidget, m_formWidget,
|
||||||
pos.x, pos.y, bestSize.x, bestSize.y);
|
pos.x, pos.y, bestSize.x, bestSize.y);
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
bool wxChoice::Create(wxWindow *parent, wxWindowID id,
|
||||||
@@ -226,7 +228,7 @@ int wxChoice::DoAppend(const wxString& item)
|
|||||||
|
|
||||||
int wxChoice::DoInsert(const wxString& item, int pos)
|
int wxChoice::DoInsert(const wxString& item, int pos)
|
||||||
{
|
{
|
||||||
wxCHECK_MSG(FALSE, -1, wxT("insert not implemented"));
|
wxCHECK_MSG(false, -1, wxT("insert not implemented"));
|
||||||
|
|
||||||
// wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
|
// wxCHECK_MSG((pos>=0) && (pos<=GetCount()), -1, wxT("invalid index"));
|
||||||
// if (pos == GetCount()) return DoAppend(item);
|
// if (pos == GetCount()) return DoAppend(item);
|
||||||
@@ -300,7 +302,7 @@ int wxChoice::GetSelection() const
|
|||||||
|
|
||||||
void wxChoice::SetSelection(int n)
|
void wxChoice::SetSelection(int n)
|
||||||
{
|
{
|
||||||
m_inSetValue = TRUE;
|
m_inSetValue = true;
|
||||||
|
|
||||||
wxStringList::compatibility_iterator node = m_stringList.Item(n);
|
wxStringList::compatibility_iterator node = m_stringList.Item(n);
|
||||||
if (node)
|
if (node)
|
||||||
@@ -327,7 +329,7 @@ void wxChoice::SetSelection(int n)
|
|||||||
XmNmenuHistory, (Widget) m_widgetArray[n], NULL);
|
XmNmenuHistory, (Widget) m_widgetArray[n], NULL);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
m_inSetValue = FALSE;
|
m_inSetValue = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int wxChoice::FindString(const wxString& s) const
|
int wxChoice::FindString(const wxString& s) const
|
||||||
@@ -342,7 +344,7 @@ int wxChoice::FindString(const wxString& s) const
|
|||||||
i++;
|
i++;
|
||||||
}
|
}
|
||||||
|
|
||||||
return -1;
|
return wxNOT_FOUND;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxString wxChoice::GetString(int n) const
|
wxString wxChoice::GetString(int n) const
|
||||||
@@ -475,7 +477,7 @@ void wxChoice::ChangeFont(bool keepOriginalSize)
|
|||||||
GetSize(& width1, & height1);
|
GetSize(& width1, & height1);
|
||||||
if (keepOriginalSize && (width != width1 || height != height1))
|
if (keepOriginalSize && (width != width1 || height != height1))
|
||||||
{
|
{
|
||||||
SetSize(-1, -1, width, height);
|
SetSize(wxDefaultCoord, wxDefaultCoord, width, height);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -507,7 +509,7 @@ int wxChoice::GetCount() const
|
|||||||
|
|
||||||
void wxChoice::DoSetItemClientData(int n, void* clientData)
|
void wxChoice::DoSetItemClientData(int n, void* clientData)
|
||||||
{
|
{
|
||||||
m_clientDataDict.Set(n, (wxClientData*)clientData, FALSE);
|
m_clientDataDict.Set(n, (wxClientData*)clientData, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void* wxChoice::DoGetItemClientData(int n) const
|
void* wxChoice::DoGetItemClientData(int n) const
|
||||||
@@ -518,7 +520,7 @@ void* wxChoice::DoGetItemClientData(int n) const
|
|||||||
void wxChoice::DoSetItemClientObject(int n, wxClientData* clientData)
|
void wxChoice::DoSetItemClientObject(int n, wxClientData* clientData)
|
||||||
{
|
{
|
||||||
// don't delete, wxItemContainer does that for us
|
// don't delete, wxItemContainer does that for us
|
||||||
m_clientDataDict.Set(n, clientData, FALSE);
|
m_clientDataDict.Set(n, clientData, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
wxClientData* wxChoice::DoGetItemClientObject(int n) const
|
wxClientData* wxChoice::DoGetItemClientObject(int n) const
|
||||||
@@ -557,3 +559,5 @@ wxSize wxChoice::DoGetBestSize() const
|
|||||||
return wxSize( ( items.x ? items.x + WIDTH_OVERHEAD : 120 ),
|
return wxSize( ( items.x ? items.x + WIDTH_OVERHEAD : 120 ),
|
||||||
items.y + HEIGHT_OVERHEAD );
|
items.y + HEIGHT_OVERHEAD );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_CHOICE
|
||||||
|
@@ -16,6 +16,10 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SLIDER
|
||||||
|
|
||||||
#include "wx/slider.h"
|
#include "wx/slider.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
|
|
||||||
@@ -106,12 +110,12 @@ bool wxSlider::Create(wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
|
XtAddCallback (sliderWidget, XmNdragCallback, (XtCallbackProc) wxSliderCallback, (XtPointer) this);
|
||||||
|
|
||||||
ChangeFont(FALSE);
|
ChangeFont(false);
|
||||||
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
|
||||||
|
|
||||||
ChangeBackgroundColour();
|
ChangeBackgroundColour();
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSlider::~wxSlider()
|
wxSlider::~wxSlider()
|
||||||
@@ -242,3 +246,4 @@ void wxSliderCallback (Widget widget, XtPointer clientData,
|
|||||||
slider->GetEventHandler()->ProcessEvent(event2);
|
slider->GetEventHandler()->ProcessEvent(event2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SLIDER
|
||||||
|
@@ -16,6 +16,10 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_SPINBTN
|
||||||
|
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
#include "wx/timer.h"
|
#include "wx/timer.h"
|
||||||
@@ -230,7 +234,7 @@ bool wxArrowButton::Create( wxSpinButton* parent, wxWindowID id,
|
|||||||
|
|
||||||
SetForegroundColour( parent->GetBackgroundColour() );
|
SetForegroundColour( parent->GetBackgroundColour() );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -272,12 +276,12 @@ bool wxSpinButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
|
|
||||||
if( !wxControl::Create( parent, id, pos, newSize, style ) )
|
if( !wxControl::Create( parent, id, pos, newSize, style ) )
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
SetName(name);
|
SetName(name);
|
||||||
|
|
||||||
m_windowId = ( id == -1 ) ? NewControlId() : id;
|
m_windowId = ( id == wxID_ANY ) ? NewControlId() : id;
|
||||||
|
|
||||||
bool isVert = IsVertical();
|
bool isVert = IsVertical();
|
||||||
wxPoint pt1, pt2;
|
wxPoint pt1, pt2;
|
||||||
@@ -289,7 +293,7 @@ bool wxSpinButton::Create( wxWindow *parent, wxWindowID id,
|
|||||||
isVert ? wxARROW_DOWN : wxARROW_LEFT,
|
isVert ? wxARROW_DOWN : wxARROW_LEFT,
|
||||||
pt2, sz2, -1 );
|
pt2, sz2, -1 );
|
||||||
|
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxSpinButton::~wxSpinButton()
|
wxSpinButton::~wxSpinButton()
|
||||||
@@ -403,3 +407,5 @@ void wxSpinButton::ChangeForegroundColour()
|
|||||||
{
|
{
|
||||||
// TODO
|
// TODO
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif // wxUSE_SPINBTN
|
||||||
|
@@ -12,6 +12,10 @@
|
|||||||
// For compilers that support precompilation, includes "wx.h".
|
// For compilers that support precompilation, includes "wx.h".
|
||||||
#include "wx/wxprec.h"
|
#include "wx/wxprec.h"
|
||||||
|
|
||||||
|
#include "wx/defs.h"
|
||||||
|
|
||||||
|
#if wxUSE_CHOICE
|
||||||
|
|
||||||
#ifndef WX_PRECOMP
|
#ifndef WX_PRECOMP
|
||||||
#include "wx/choice.h"
|
#include "wx/choice.h"
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
@@ -62,7 +66,7 @@ bool wxChoice::Create(
|
|||||||
,rValidator
|
,rValidator
|
||||||
,rsName
|
,rsName
|
||||||
))
|
))
|
||||||
return FALSE;
|
return false;
|
||||||
lSstyle = CBS_DROPDOWNLIST |
|
lSstyle = CBS_DROPDOWNLIST |
|
||||||
WS_TABSTOP |
|
WS_TABSTOP |
|
||||||
WS_VISIBLE;
|
WS_VISIBLE;
|
||||||
@@ -79,7 +83,7 @@ bool wxChoice::Create(
|
|||||||
if (!OS2CreateControl( wxT("COMBOBOX")
|
if (!OS2CreateControl( wxT("COMBOBOX")
|
||||||
,lSstyle
|
,lSstyle
|
||||||
))
|
))
|
||||||
return FALSE;
|
return false;
|
||||||
|
|
||||||
//
|
//
|
||||||
// A choice/combobox normally has a white background (or other, depending
|
// A choice/combobox normally has a white background (or other, depending
|
||||||
@@ -102,7 +106,7 @@ bool wxChoice::Create(
|
|||||||
,rSize.y
|
,rSize.y
|
||||||
);
|
);
|
||||||
delete pTextFont;
|
delete pTextFont;
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxChoice::Create
|
} // end of wxChoice::Create
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -419,7 +423,7 @@ bool wxChoice::OS2Command(
|
|||||||
//
|
//
|
||||||
// "selection changed" is the only event we're after
|
// "selection changed" is the only event we're after
|
||||||
//
|
//
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
int n = GetSelection();
|
int n = GetSelection();
|
||||||
|
|
||||||
@@ -438,7 +442,7 @@ bool wxChoice::OS2Command(
|
|||||||
vEvent.SetClientData(GetClientData(n));
|
vEvent.SetClientData(GetClientData(n));
|
||||||
ProcessCommand(vEvent);
|
ProcessCommand(vEvent);
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxChoice::OS2Command
|
} // end of wxChoice::OS2Command
|
||||||
|
|
||||||
void wxChoice::Free()
|
void wxChoice::Free()
|
||||||
@@ -452,4 +456,6 @@ void wxChoice::Free()
|
|||||||
delete GetClientObject(n);
|
delete GetClientObject(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // end of wxhoice::Free
|
} // end of wxChoice::Free
|
||||||
|
|
||||||
|
#endif // wxUSE_CHOICE
|
||||||
|
@@ -23,6 +23,8 @@
|
|||||||
#include <wx/scrolwin.h>
|
#include <wx/scrolwin.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if wxUSE_SLIDER
|
||||||
|
|
||||||
#include "wx/slider.h"
|
#include "wx/slider.h"
|
||||||
#include "wx/os2/private.h"
|
#include "wx/os2/private.h"
|
||||||
|
|
||||||
@@ -460,7 +462,7 @@ bool wxSlider::Create(
|
|||||||
,(PVOID)&lColor
|
,(PVOID)&lColor
|
||||||
);
|
);
|
||||||
SetValue(nValue);
|
SetValue(nValue);
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSlider::Create
|
} // end of wxSlider::Create
|
||||||
|
|
||||||
void wxSlider::DoSetSize(
|
void wxSlider::DoSetSize(
|
||||||
@@ -941,7 +943,7 @@ bool wxSlider::OS2OnScroll(
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
|
int nPixelRange = SHORT1FROMMR(::WinSendMsg( GetHwnd()
|
||||||
@@ -970,7 +972,7 @@ bool wxSlider::OS2OnScroll(
|
|||||||
//
|
//
|
||||||
// Out of range - but we did process it
|
// Out of range - but we did process it
|
||||||
//
|
//
|
||||||
return TRUE;
|
return true;
|
||||||
}
|
}
|
||||||
SetValue(nNewPos);
|
SetValue(nNewPos);
|
||||||
|
|
||||||
@@ -1168,6 +1170,7 @@ bool wxSlider::Show(
|
|||||||
::WinShowWindow((HWND)m_hStaticMin, bShow);
|
::WinShowWindow((HWND)m_hStaticMin, bShow);
|
||||||
if(m_hStaticMax)
|
if(m_hStaticMax)
|
||||||
::WinShowWindow((HWND)m_hStaticMax, bShow);
|
::WinShowWindow((HWND)m_hStaticMax, bShow);
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSlider::Show
|
} // end of wxSlider::Show
|
||||||
|
|
||||||
|
#endif // wxUSE_SLIDER
|
||||||
|
@@ -31,7 +31,7 @@
|
|||||||
#include "wx/wx.h"
|
#include "wx/wx.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if wxUSE_SPINBTN
|
#if wxUSE_SPINCTRL
|
||||||
|
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
#include "wx/os2/private.h"
|
#include "wx/os2/private.h"
|
||||||
@@ -50,7 +50,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxSpinCtrl, wxControl)
|
|||||||
|
|
||||||
BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
|
BEGIN_EVENT_TABLE(wxSpinCtrl, wxSpinButton)
|
||||||
EVT_CHAR(wxSpinCtrl::OnChar)
|
EVT_CHAR(wxSpinCtrl::OnChar)
|
||||||
EVT_SPIN(-1, wxSpinCtrl::OnSpinChange)
|
EVT_SPIN(wxID_ANY, wxSpinCtrl::OnSpinChange)
|
||||||
EVT_SET_FOCUS(wxSpinCtrl::OnSetFocus)
|
EVT_SET_FOCUS(wxSpinCtrl::OnSetFocus)
|
||||||
END_EVENT_TABLE()
|
END_EVENT_TABLE()
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -132,7 +132,7 @@ bool wxSpinCtrl::Create(
|
|||||||
{
|
{
|
||||||
SWP vSwp;
|
SWP vSwp;
|
||||||
|
|
||||||
if (vId == -1)
|
if (vId == wxID_ANY)
|
||||||
m_windowId = NewControlId();
|
m_windowId = NewControlId();
|
||||||
else
|
else
|
||||||
m_windowId = vId;
|
m_windowId = vId;
|
||||||
@@ -174,7 +174,7 @@ bool wxSpinCtrl::Create(
|
|||||||
);
|
);
|
||||||
if (m_hWnd == 0)
|
if (m_hWnd == 0)
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
m_hWndBuddy = m_hWnd; // One in the same for OS/2
|
m_hWndBuddy = m_hWnd; // One in the same for OS/2
|
||||||
if(pParent)
|
if(pParent)
|
||||||
@@ -207,7 +207,7 @@ bool wxSpinCtrl::Create(
|
|||||||
fnWndProcSpinCtrl = (WXFARPROC)::WinSubclassWindow(m_hWnd, (PFNWP)wxSpinCtrlWndProc);
|
fnWndProcSpinCtrl = (WXFARPROC)::WinSubclassWindow(m_hWnd, (PFNWP)wxSpinCtrlWndProc);
|
||||||
m_svAllSpins.Add(this);
|
m_svAllSpins.Add(this);
|
||||||
delete pTextFont;
|
delete pTextFont;
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSpinCtrl::Create
|
} // end of wxSpinCtrl::Create
|
||||||
|
|
||||||
wxSize wxSpinCtrl::DoGetBestSize() const
|
wxSize wxSpinCtrl::DoGetBestSize() const
|
||||||
@@ -301,10 +301,10 @@ bool wxSpinCtrl::Enable(
|
|||||||
{
|
{
|
||||||
if (!wxControl::Enable(bEnable))
|
if (!wxControl::Enable(bEnable))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
::WinEnableWindow(GetHwnd(), bEnable);
|
::WinEnableWindow(GetHwnd(), bEnable);
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSpinCtrl::Enable
|
} // end of wxSpinCtrl::Enable
|
||||||
|
|
||||||
wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl(
|
wxSpinCtrl* wxSpinCtrl::GetSpinForTextCtrl(
|
||||||
@@ -455,7 +455,7 @@ bool wxSpinCtrl::ProcessTextCommand(
|
|||||||
//
|
//
|
||||||
// Not processed
|
// Not processed
|
||||||
//
|
//
|
||||||
return FALSE;
|
return false;
|
||||||
} // end of wxSpinCtrl::ProcessTextCommand
|
} // end of wxSpinCtrl::ProcessTextCommand
|
||||||
|
|
||||||
void wxSpinCtrl::SetFocus()
|
void wxSpinCtrl::SetFocus()
|
||||||
@@ -470,13 +470,13 @@ bool wxSpinCtrl::SetFont(
|
|||||||
if (!wxWindowBase::SetFont(rFont))
|
if (!wxWindowBase::SetFont(rFont))
|
||||||
{
|
{
|
||||||
// nothing to do
|
// nothing to do
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
wxOS2SetFont( m_hWnd
|
wxOS2SetFont( m_hWnd
|
||||||
,rFont
|
,rFont
|
||||||
);
|
);
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSpinCtrl::SetFont
|
} // end of wxSpinCtrl::SetFont
|
||||||
|
|
||||||
void wxSpinCtrl::SetValue(
|
void wxSpinCtrl::SetValue(
|
||||||
@@ -495,9 +495,9 @@ bool wxSpinCtrl::Show(
|
|||||||
{
|
{
|
||||||
if (!wxControl::Show(bShow))
|
if (!wxControl::Show(bShow))
|
||||||
{
|
{
|
||||||
return FALSE;
|
return false;
|
||||||
}
|
}
|
||||||
return TRUE;
|
return true;
|
||||||
} // end of wxSpinCtrl::Show
|
} // end of wxSpinCtrl::Show
|
||||||
|
|
||||||
void wxSpinCtrl::SetSelection (
|
void wxSpinCtrl::SetSelection (
|
||||||
@@ -516,4 +516,4 @@ void wxSpinCtrl::SetSelection (
|
|||||||
::WinSendMsg(m_hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), (MPARAM)0);
|
::WinSendMsg(m_hWnd, EM_SETSEL, MPFROM2SHORT((USHORT)lFrom, (USHORT)lTo), (MPARAM)0);
|
||||||
} // end of wxSpinCtrl::SetSelection
|
} // end of wxSpinCtrl::SetSelection
|
||||||
|
|
||||||
#endif //wxUSE_SPINBTN
|
#endif //wxUSE_SPINCTRL
|
||||||
|
Reference in New Issue
Block a user