| 1 | ///////////////////////////////////////////////////////////////////////////// |
| 2 | // Name: src/palmos/spinbutt.cpp |
| 3 | // Purpose: wxSpinButton |
| 4 | // Author: William Osborne - minimal working wxPalmOS port |
| 5 | // Modified by: |
| 6 | // Created: 10/13/04 |
| 7 | // RCS-ID: $Id$ |
| 8 | // Copyright: (c) William Osborne |
| 9 | // Licence: wxWindows licence |
| 10 | ///////////////////////////////////////////////////////////////////////////// |
| 11 | |
| 12 | // ============================================================================ |
| 13 | // declarations |
| 14 | // ============================================================================ |
| 15 | |
| 16 | // ---------------------------------------------------------------------------- |
| 17 | // headers |
| 18 | // ---------------------------------------------------------------------------- |
| 19 | |
| 20 | // For compilers that support precompilation, includes "wx.h". |
| 21 | #include "wx/wxprec.h" |
| 22 | |
| 23 | #ifdef __BORLANDC__ |
| 24 | #pragma hdrstop |
| 25 | #endif |
| 26 | |
| 27 | #if wxUSE_SPINBTN |
| 28 | |
| 29 | #include "wx/spinbutt.h" |
| 30 | |
| 31 | #ifndef WX_PRECOMP |
| 32 | #include "wx/app.h" |
| 33 | #endif |
| 34 | |
| 35 | IMPLEMENT_DYNAMIC_CLASS(wxSpinEvent, wxNotifyEvent) |
| 36 | |
| 37 | // ============================================================================ |
| 38 | // implementation |
| 39 | // ============================================================================ |
| 40 | |
| 41 | // ---------------------------------------------------------------------------- |
| 42 | // wxWin macros |
| 43 | // ---------------------------------------------------------------------------- |
| 44 | |
| 45 | |
| 46 | #if wxUSE_EXTENDED_RTTI |
| 47 | WX_DEFINE_FLAGS( wxSpinButtonStyle ) |
| 48 | |
| 49 | wxBEGIN_FLAGS( wxSpinButtonStyle ) |
| 50 | // new style border flags, we put them first to |
| 51 | // use them for streaming out |
| 52 | wxFLAGS_MEMBER(wxBORDER_SIMPLE) |
| 53 | wxFLAGS_MEMBER(wxBORDER_SUNKEN) |
| 54 | wxFLAGS_MEMBER(wxBORDER_DOUBLE) |
| 55 | wxFLAGS_MEMBER(wxBORDER_RAISED) |
| 56 | wxFLAGS_MEMBER(wxBORDER_STATIC) |
| 57 | wxFLAGS_MEMBER(wxBORDER_NONE) |
| 58 | |
| 59 | // old style border flags |
| 60 | wxFLAGS_MEMBER(wxSIMPLE_BORDER) |
| 61 | wxFLAGS_MEMBER(wxSUNKEN_BORDER) |
| 62 | wxFLAGS_MEMBER(wxDOUBLE_BORDER) |
| 63 | wxFLAGS_MEMBER(wxRAISED_BORDER) |
| 64 | wxFLAGS_MEMBER(wxSTATIC_BORDER) |
| 65 | wxFLAGS_MEMBER(wxBORDER) |
| 66 | |
| 67 | // standard window styles |
| 68 | wxFLAGS_MEMBER(wxTAB_TRAVERSAL) |
| 69 | wxFLAGS_MEMBER(wxCLIP_CHILDREN) |
| 70 | wxFLAGS_MEMBER(wxTRANSPARENT_WINDOW) |
| 71 | wxFLAGS_MEMBER(wxWANTS_CHARS) |
| 72 | wxFLAGS_MEMBER(wxFULL_REPAINT_ON_RESIZE) |
| 73 | wxFLAGS_MEMBER(wxALWAYS_SHOW_SB ) |
| 74 | wxFLAGS_MEMBER(wxVSCROLL) |
| 75 | wxFLAGS_MEMBER(wxHSCROLL) |
| 76 | |
| 77 | wxFLAGS_MEMBER(wxSP_HORIZONTAL) |
| 78 | wxFLAGS_MEMBER(wxSP_VERTICAL) |
| 79 | wxFLAGS_MEMBER(wxSP_ARROW_KEYS) |
| 80 | wxFLAGS_MEMBER(wxSP_WRAP) |
| 81 | |
| 82 | wxEND_FLAGS( wxSpinButtonStyle ) |
| 83 | |
| 84 | IMPLEMENT_DYNAMIC_CLASS_XTI(wxSpinButton, wxControl,"wx/spinbut.h") |
| 85 | |
| 86 | wxBEGIN_PROPERTIES_TABLE(wxSpinButton) |
| 87 | wxEVENT_RANGE_PROPERTY( Spin , wxEVT_SCROLL_TOP , wxEVT_SCROLL_ENDSCROLL , wxSpinEvent ) |
| 88 | |
| 89 | wxPROPERTY( Value , int , SetValue, GetValue, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) |
| 90 | wxPROPERTY( Min , int , SetMin, GetMin, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) |
| 91 | wxPROPERTY( Max , int , SetMax, GetMax, 0 , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) |
| 92 | wxPROPERTY_FLAGS( WindowStyle , wxSpinButtonStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style |
| 93 | wxEND_PROPERTIES_TABLE() |
| 94 | |
| 95 | wxBEGIN_HANDLERS_TABLE(wxSpinButton) |
| 96 | wxEND_HANDLERS_TABLE() |
| 97 | |
| 98 | wxCONSTRUCTOR_5( wxSpinButton , wxWindow* , Parent , wxWindowID , Id , wxPoint , Position , wxSize , Size , long , WindowStyle ) |
| 99 | #else |
| 100 | IMPLEMENT_DYNAMIC_CLASS(wxSpinButton, wxControl) |
| 101 | #endif |
| 102 | |
| 103 | |
| 104 | |
| 105 | // ---------------------------------------------------------------------------- |
| 106 | // wxSpinButton |
| 107 | // ---------------------------------------------------------------------------- |
| 108 | |
| 109 | bool wxSpinButton::Create(wxWindow *parent, |
| 110 | wxWindowID id, |
| 111 | const wxPoint& pos, |
| 112 | const wxSize& size, |
| 113 | long style, |
| 114 | const wxString& name) |
| 115 | { |
| 116 | return false; |
| 117 | } |
| 118 | |
| 119 | wxSpinButton::~wxSpinButton() |
| 120 | { |
| 121 | } |
| 122 | |
| 123 | // ---------------------------------------------------------------------------- |
| 124 | // size calculation |
| 125 | // ---------------------------------------------------------------------------- |
| 126 | |
| 127 | wxSize wxSpinButton::DoGetBestSize() const |
| 128 | { |
| 129 | return wxSize(0,0), |
| 130 | } |
| 131 | |
| 132 | // ---------------------------------------------------------------------------- |
| 133 | // Attributes |
| 134 | // ---------------------------------------------------------------------------- |
| 135 | |
| 136 | int wxSpinButton::GetValue() const |
| 137 | { |
| 138 | return 0; |
| 139 | } |
| 140 | |
| 141 | void wxSpinButton::SetValue(int val) |
| 142 | { |
| 143 | } |
| 144 | |
| 145 | void wxSpinButton::SetRange(int minVal, int maxVal) |
| 146 | { |
| 147 | } |
| 148 | |
| 149 | #endif |
| 150 | // wxUSE_SPINBTN |