projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix DrawStatusField() to work correctly with wxSB_FLAT style.
[wxWidgets.git]
/
src
/
motif
/
accel.cpp
diff --git
a/src/motif/accel.cpp
b/src/motif/accel.cpp
index 4c87676c43b5507c771923e79a7b046455fe5585..3aad0fb5b533a8f29bf1d9e62a1b00d064c5421c 100644
(file)
--- a/
src/motif/accel.cpp
+++ b/
src/motif/accel.cpp
@@
-1,5
+1,5
@@
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: accel.cpp
+// Name:
src/motif/
accel.cpp
// Purpose: wxAcceleratorTable
// Author: Julian Smart
// Modified by:
// Purpose: wxAcceleratorTable
// Author: Julian Smart
// Modified by:
@@
-9,26
+9,26
@@
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
-#ifdef __GNUG__
-#pragma implementation "accel.h"
-#endif
+// For compilers that support precompilation, includes "wx.h".
+#include "wx/wxprec.h"
-#include "wx/setup.h"
#include "wx/accel.h"
#include "wx/accel.h"
-#include "wx/string.h"
-#include "wx/utils.h"
+
+#ifndef WX_PRECOMP
+ #include "wx/string.h"
+ #include "wx/utils.h"
+#endif
+
#include <ctype.h>
#include <ctype.h>
-#if !USE_SHARED_LIBRARIES
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
IMPLEMENT_DYNAMIC_CLASS(wxAcceleratorTable, wxObject)
-#endif
class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
{
class WXDLLEXPORT wxAcceleratorRefData: public wxObjectRefData
{
- friend class
WXDLLEXPORT
wxAcceleratorTable;
+ friend class wxAcceleratorTable;
public:
wxAcceleratorRefData();
public:
wxAcceleratorRefData();
- ~wxAcceleratorRefData();
+
virtual
~wxAcceleratorRefData();
public:
int m_count;
public:
int m_count;
@@
-40,19
+40,19
@@
public:
wxAcceleratorRefData::wxAcceleratorRefData()
{
m_count = 0;
wxAcceleratorRefData::wxAcceleratorRefData()
{
m_count = 0;
- m_entries =
(wxAcceleratorEntry*)
NULL;
+ m_entries = NULL;
}
wxAcceleratorRefData::~wxAcceleratorRefData()
{
delete[] m_entries;
}
wxAcceleratorRefData::~wxAcceleratorRefData()
{
delete[] m_entries;
- m_entries =
(wxAcceleratorEntry*)
NULL;
+ m_entries = NULL;
m_count = 0;
}
wxAcceleratorTable::wxAcceleratorTable()
{
m_count = 0;
}
wxAcceleratorTable::wxAcceleratorTable()
{
- m_refData =
(wxAcceleratorRefData*)
NULL;
+ m_refData = NULL;
}
wxAcceleratorTable::~wxAcceleratorTable()
}
wxAcceleratorTable::~wxAcceleratorTable()
@@
-61,13
+61,13
@@
wxAcceleratorTable::~wxAcceleratorTable()
}
// Load from .rc resource
}
// Load from .rc resource
-wxAcceleratorTable::wxAcceleratorTable(const wxString&
resource
)
+wxAcceleratorTable::wxAcceleratorTable(const wxString&
WXUNUSED(resource)
)
{
m_refData = new wxAcceleratorRefData;
}
// Create from an array
{
m_refData = new wxAcceleratorRefData;
}
// Create from an array
-wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
+wxAcceleratorTable::wxAcceleratorTable(int n,
const
wxAcceleratorEntry entries[])
{
wxAcceleratorRefData* data = new wxAcceleratorRefData;
m_refData = data;
{
wxAcceleratorRefData* data = new wxAcceleratorRefData;
m_refData = data;
@@
-80,9
+80,9
@@
wxAcceleratorTable::wxAcceleratorTable(int n, wxAcceleratorEntry entries[])
}
}
-bool wxAcceleratorTable::Ok() const
+bool wxAcceleratorTable::
Is
Ok() const
{
{
- return (m_refData !=
(wxAcceleratorRefData*)
NULL);
+ return (m_refData != NULL);
}
int wxAcceleratorTable::GetCount() const
}
int wxAcceleratorTable::GetCount() const
@@
-101,7
+101,7
@@
bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const
bool eventAltDown = event.AltDown();
bool eventCtrlDown = event.ControlDown();
bool eventShiftDown = event.ShiftDown();
bool eventAltDown = event.AltDown();
bool eventCtrlDown = event.ControlDown();
bool eventShiftDown = event.ShiftDown();
- int eventKeyCode = event.KeyCode();
+ int eventKeyCode = event.
Get
KeyCode();
bool accAltDown = ((GetFlags() & wxACCEL_ALT) == wxACCEL_ALT);
bool accCtrlDown = ((GetFlags() & wxACCEL_CTRL) == wxACCEL_CTRL);
bool accAltDown = ((GetFlags() & wxACCEL_ALT) == wxACCEL_ALT);
bool accCtrlDown = ((GetFlags() & wxACCEL_CTRL) == wxACCEL_CTRL);
@@
-115,4
+115,3
@@
bool wxAcceleratorEntry::MatchesEvent(const wxKeyEvent& event) const
(eventShiftDown == accShiftDown) &&
((eventKeyCode == accKeyCode || eventKeyCode == accKeyCode2))) ;
}
(eventShiftDown == accShiftDown) &&
((eventKeyCode == accKeyCode || eventKeyCode == accKeyCode2))) ;
}
-