X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/ab1ce969dfb27f5d366ee6a0de3ff2bc0205b56a..a7cfad3ad6bc8080b33a0878a14b1c02ca33fe3e:/src/palmos/control.cpp diff --git a/src/palmos/control.cpp b/src/palmos/control.cpp index ca0acf8d1f..66dd535de7 100644 --- a/src/palmos/control.cpp +++ b/src/palmos/control.cpp @@ -36,16 +36,20 @@ #include "wx/settings.h" #include "wx/button.h" #include "wx/checkbox.h" + #include "wx/radiobut.h" + #include "wx/slider.h" + #include "wx/toplevel.h" #endif -#include "wx/toplevel.h" #include "wx/tglbtn.h" -#include "wx/radiobut.h" -#include "wx/slider.h" #include #include -#include +#ifdef __WXPALMOS6__ + #include +#else + #include +#endif // __WXPALMOS6__ // ---------------------------------------------------------------------------- // wxWin macros @@ -73,8 +77,9 @@ void wxControl::Init() wxControl::~wxControl() { + SendDestroyEvent(); + SetLabel(wxEmptyString); - m_isBeingDeleted = true; DestroyChildren(); @@ -137,7 +142,7 @@ bool wxControl::PalmCreateControl(int style, (void **)&form, GetId(), (ControlStyleType)style, - wxEmptyString, + NULL, x, y, w, @@ -152,7 +157,7 @@ bool wxControl::PalmCreateControl(int style, m_palmControl = true; - SetInitialBestSize(size); + SetInitialSize(size); SetLabel(label); Show(); return true; @@ -202,7 +207,7 @@ bool wxControl::PalmCreateField(const wxString& label, m_palmField = true; - SetInitialBestSize(size); + SetInitialSize(size); SetLabel(label); Show(); return true; @@ -421,7 +426,7 @@ void wxControl::SetControlLabel(const wxString& label) ControlType* control = (ControlType*)GetObjectPtr(); if(control==NULL) return; - CtlSetLabel(control,wxEmptyString); + CtlSetLabel(control, ""); m_label = label; if(!m_label.empty()) CtlSetLabel(control,m_label.c_str()); @@ -452,7 +457,7 @@ wxString wxControl::GetControlLabel() return wxEmptyString; return CtlGetLabel(control); } - +#if 0 wxString wxControl::GetLabel() { if(IsPalmField()) @@ -464,7 +469,7 @@ wxString wxControl::GetLabel() return wxEmptyString; } - +#endif /* static */ wxVisualAttributes wxControl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant)) { @@ -501,7 +506,7 @@ wxControl::GetCompositeControlsDefaultAttributes(wxWindowVariant WXUNUSED(varian bool wxControl::ProcessCommand(wxCommandEvent& event) { - return GetEventHandler()->ProcessEvent(event); + return HandleWindowEvent(event); } void wxControl::OnEraseBackground(wxEraseEvent& event)