]> git.saurik.com Git - wxWidgets.git/blame - src/palmos/menuitem.cpp
Correct the direction passed to wxDataObject in wxGTK clipboard code.
[wxWidgets.git] / src / palmos / menuitem.cpp
CommitLineData
ffecfa5a 1///////////////////////////////////////////////////////////////////////////////
e2731512 2// Name: src/palmos/menuitem.cpp
ffecfa5a 3// Purpose: wxMenuItem implementation
e2731512 4// Author: William Osborne - minimal working wxPalmOS port
ffecfa5a
JS
5// Modified by:
6// Created: 10/13/04
e2731512 7// RCS-ID: $Id$
ffecfa5a
JS
8// Copyright: (c) William Osborne
9// Licence: wxWindows licence
10///////////////////////////////////////////////////////////////////////////////
11
12// ===========================================================================
13// declarations
14// ===========================================================================
15
16// ---------------------------------------------------------------------------
17// headers
18// ---------------------------------------------------------------------------
19
ffecfa5a
JS
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_MENUS
28
3b3dc801 29#include "wx/menuitem.h"
e4db172a 30
ffecfa5a
JS
31#ifndef WX_PRECOMP
32 #include "wx/font.h"
33 #include "wx/bitmap.h"
34 #include "wx/settings.h"
ffecfa5a
JS
35 #include "wx/window.h"
36 #include "wx/accel.h"
ffecfa5a 37 #include "wx/string.h"
e4db172a 38 #include "wx/log.h"
3b3dc801 39 #include "wx/menu.h"
ffecfa5a
JS
40#endif
41
ffecfa5a
JS
42#if wxUSE_ACCEL
43 #include "wx/accel.h"
44#endif // wxUSE_ACCEL
45
46// ---------------------------------------------------------------------------
47// macro
48// ---------------------------------------------------------------------------
49
50// conditional compilation
51#if wxUSE_OWNER_DRAWN
52 #define OWNER_DRAWN_ONLY( code ) if ( IsOwnerDrawn() ) code
53#else // !wxUSE_OWNER_DRAWN
54 #define OWNER_DRAWN_ONLY( code )
55#endif // wxUSE_OWNER_DRAWN/!wxUSE_OWNER_DRAWN
56
57// ============================================================================
58// implementation
59// ============================================================================
60
ffecfa5a
JS
61// ----------------------------------------------------------------------------
62// wxMenuItem
63// ----------------------------------------------------------------------------
64
65// ctor & dtor
66// -----------
67
68wxMenuItem::wxMenuItem(wxMenu *pParentMenu,
69 int id,
70 const wxString& text,
71 const wxString& strHelp,
72 wxItemKind kind,
73 wxMenu *pSubMenu)
74 : wxMenuItemBase(pParentMenu, id, text, strHelp, kind, pSubMenu)
75#if wxUSE_OWNER_DRAWN
76 , wxOwnerDrawn(text, kind == wxITEM_CHECK, true)
77#endif // owner drawn
78{
79}
80
81wxMenuItem::wxMenuItem(wxMenu *parentMenu,
82 int id,
83 const wxString& text,
84 const wxString& help,
85 bool isCheckable,
86 wxMenu *subMenu)
87 : wxMenuItemBase(parentMenu, id, text, help,
88 isCheckable ? wxITEM_CHECK : wxITEM_NORMAL, subMenu)
89#if wxUSE_OWNER_DRAWN
90 , wxOwnerDrawn(text, isCheckable, true)
91#endif // owner drawn
92{
93}
94
95void wxMenuItem::Init()
96{
97}
98
99wxMenuItem::~wxMenuItem()
100{
101}
102
103// misc
104// ----
105
ffecfa5a
JS
106// get item state
107// --------------
108
109bool wxMenuItem::IsChecked() const
110{
111 return false;
112}
113
ffecfa5a
JS
114// radio group stuff
115// -----------------
116
117void wxMenuItem::SetAsRadioGroupStart()
118{
119}
120
121void wxMenuItem::SetRadioGroupStart(int start)
122{
123}
124
125void wxMenuItem::SetRadioGroupEnd(int end)
126{
127}
128
129// change item state
130// -----------------
131
132void wxMenuItem::Enable(bool enable)
133{
134}
135
136void wxMenuItem::Check(bool check)
137{
138}
139
52af3158 140void wxMenuItem::SetItemLabel(const wxString& text)
ffecfa5a
JS
141{
142}
143
144void wxMenuItem::SetCheckable(bool checkable)
145{
146}
147
148// ----------------------------------------------------------------------------
149// wxMenuItemBase
150// ----------------------------------------------------------------------------
151
152wxMenuItem *wxMenuItemBase::New(wxMenu *parentMenu,
153 int id,
154 const wxString& name,
155 const wxString& help,
156 wxItemKind kind,
157 wxMenu *subMenu)
158{
159 return new wxMenuItem(parentMenu, id, name, help, kind, subMenu);
160}
161
162#endif // wxUSE_MENUS