wxButton, wxCheckBox, wxSlider, wxToggleButton native implementations for PalmOS.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@31589 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-01-25 06:55:10 +00:00
parent 3a0c618112
commit bdb5436554
17 changed files with 151 additions and 162 deletions

View File

@@ -135,6 +135,8 @@ private:
#include "wx/cocoa/checkbox.h"
#elif defined(__WXPM__)
#include "wx/os2/checkbox.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/checkbox.h"
#endif
#endif // wxUSE_CHECKBOX

View File

@@ -51,7 +51,6 @@ public:
// implementation from now on
virtual void Command(wxCommandEvent& event);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void ApplyParentThemeBackground(const wxColour& bg)
{
@@ -72,7 +71,6 @@ protected:
// usually overridden base class virtuals
virtual wxSize DoGetBestSize() const;
virtual WXDWORD MSWGetStyle(long style, WXDWORD *exstyle) const ;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxButton)

View File

@@ -2,10 +2,10 @@
// Name: wx/palmos/checkbox.h
// Purpose: wxCheckBox class
// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Modified by: Wlodzimierz ABX Skiba - native implementation
// Created: 10/13/04
// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Copyright: (c) William Osborne, Wlodzimierz Skiba
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -45,9 +45,6 @@ public:
virtual void SetValue(bool value);
virtual bool GetValue() const;
virtual void SetLabel(const wxString& label);
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void Command(wxCommandEvent& event);
protected:

View File

@@ -2,10 +2,10 @@
// Name: wx/palmos/control.h
// Purpose: wxControl class
// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Modified by: Wlodzimierz ABX Skiba - native implementation
// Created: 10/13/04
// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Copyright: (c) William Osborne, Wlodzimierz Skiba
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -50,6 +50,9 @@ public:
virtual bool Show( bool show = true );
virtual bool IsShown() const;
virtual void SetLabel(const wxString& label);
virtual wxString GetLabel();
// implementation from now on
// --------------------------
@@ -103,7 +106,6 @@ protected:
wxArrayLong m_subControls;
ControlType *m_control;
uint16_t m_objectIndex;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxControl)

View File

@@ -512,7 +512,7 @@
#define wxUSE_BUTTON 1 // wxButton
#define wxUSE_BMPBUTTON 0 // wxBitmapButton
#define wxUSE_CALENDARCTRL 0 // wxCalendarCtrl
#define wxUSE_CHECKBOX 0 // wxCheckBox
#define wxUSE_CHECKBOX 1 // wxCheckBox
#define wxUSE_CHECKLISTBOX 0 // wxCheckListBox (requires wxUSE_OWNER_DRAWN)
#define wxUSE_CHOICE 0 // wxChoice
#define wxUSE_COMBOBOX 0 // wxComboBox
@@ -523,7 +523,7 @@
#define wxUSE_RADIOBOX 0 // wxRadioBox
#define wxUSE_RADIOBTN 0 // wxRadioButton
#define wxUSE_SCROLLBAR 0 // wxScrollBar
#define wxUSE_SLIDER 0 // wxSlider
#define wxUSE_SLIDER 1 // wxSlider
#define wxUSE_SPINBTN 0 // wxSpinButton
#define wxUSE_SPINCTRL 0 // wxSpinCtrl
#define wxUSE_STATBOX 0 // wxStaticBox
@@ -531,7 +531,7 @@
#define wxUSE_STATTEXT 0 // wxStaticText
#define wxUSE_STATBMP 0 // wxStaticBitmap
#define wxUSE_TEXTCTRL 0 // wxTextCtrl
#define wxUSE_TOGGLEBTN 0 // requires wxButton
#define wxUSE_TOGGLEBTN 1 // requires wxButton
#define wxUSE_TREECTRL 0 // wxTreeCtrl
// Use a status bar class? Depending on the value of wxUSE_NATIVE_STATUSBAR

View File

@@ -2,10 +2,10 @@
// Name: wx/palmos/slider95.h
// Purpose: wxSlider class
// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Modified by: Wlodzimierz ABX Skiba - native implementation
// Created: 10/13/04
// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Copyright: (c) William Osborne, Wlodzimierz Skiba
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -48,16 +48,14 @@ public:
void GetPosition(int *x, int *y) const;
bool Show(bool show = TRUE);
void SetRange(int minValue, int maxValue);
int GetMin() const { return m_rangeMin; }
int GetMax() const { return m_rangeMax; }
int GetMin() const;
int GetMax() const;
// For trackbars only
void SetTickFreq(int n, int pos);
int GetTickFreq() const { return m_tickFreq; }
int GetTickFreq() const { return GetPageSize(); }
void SetPageSize(int pageSize);
int GetPageSize() const;
void ClearSel();
@@ -71,28 +69,10 @@ public:
int GetThumbLength() const;
void SetTick(int tickPos);
// IMPLEMENTATION
WXHWND GetStaticMin() const { return m_staticMin; }
WXHWND GetStaticMax() const { return m_staticMax; }
WXHWND GetEditValue() const { return m_staticValue; }
virtual bool ContainsHWND(WXHWND hWnd) const;
// implementation
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
WXWORD pos, WXHWND control);
protected:
WXHWND m_staticMin;
WXHWND m_staticMax;
WXHWND m_staticValue;
int m_rangeMin;
int m_rangeMax;
int m_pageSize;
int m_lineSize;
int m_tickFreq;
virtual void DoGetSize(int *width, int *height) const;
virtual void DoSetSize(int x, int y,

View File

@@ -3,10 +3,10 @@
// Purpose: Declaration of the wxToggleButton class, which implements a
// toggle button under Palm OS.
// Author: William Osborne - minimal working wxPalmOS port
// Modified by:
// Modified by: Wlodzimierz ABX Skiba - native implementation
// Created: 10/13/04
// RCS-ID: $Id$
// Copyright: (c) William Osborne
// Copyright: (c) William Osborne, Wlodzimierz Skiba
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
@@ -44,14 +44,11 @@ public:
virtual void SetValue(bool value);
virtual bool GetValue() const ;
virtual bool MSWCommand(WXUINT param, WXWORD id);
virtual void SetLabel(const wxString& label);
virtual void Command(wxCommandEvent& event);
protected:
virtual wxSize DoGetBestSize() const;
virtual wxBorder GetDefaultBorder() const;
virtual WXDWORD MSWGetStyle(long flags, WXDWORD *exstyle = NULL) const;
private:
DECLARE_DYNAMIC_CLASS_NO_COPY(wxToggleButton)

View File

@@ -81,6 +81,9 @@ public:
void SetLastFocus(wxWindow *win) { m_winLastFocused = win; }
wxWindow *GetLastFocus() const { return m_winLastFocused; }
// interface to native frame structure
FormType *GetForm();
protected:
// common part of all ctors
void Init();

View File

@@ -108,6 +108,8 @@ private:
#include "wx/cocoa/slider.h"
#elif defined(__WXPM__)
#include "wx/os2/slider.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/slider.h"
#endif
#endif // wxUSE_SLIDER

View File

@@ -34,6 +34,8 @@ END_DECLARE_EVENT_TYPES()
#include "wx/motif/tglbtn.h"
#elif defined(__WXMAC__)
#include "wx/mac/tglbtn.h"
#elif defined(__WXPALMOS__)
#include "wx/palmos/tglbtn.h"
/*
# elif defined(__WXPM__)
# include "wx/os2/tglbtn.h"