Source cleaning: tabs, whitespaces, -1/wxID_ANY, TRUE/true, FALSE/false.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -85,7 +85,7 @@ class WXDLLIMPEXP_BASE wxEncodingConverter : public wxObject
|
||||
// both modes gurantee that output string will have same length
|
||||
// as input string
|
||||
//
|
||||
// Returns FALSE if given conversion is impossible, TRUE otherwise
|
||||
// Returns false if given conversion is impossible, true otherwise
|
||||
// (conversion may be impossible either if you try to convert
|
||||
// to Unicode with non-Unicode build of wxWidgets or if input
|
||||
// or output encoding is not supported.)
|
||||
|
@@ -1256,7 +1256,7 @@ public:
|
||||
int GetMenuId() const { return m_menuId; }
|
||||
|
||||
// only for wxEVT_MENU_OPEN/CLOSE
|
||||
bool IsPopup() const { return m_menuId == -1; }
|
||||
bool IsPopup() const { return m_menuId == wxID_ANY; }
|
||||
|
||||
// only for wxEVT_MENU_OPEN/CLOSE
|
||||
wxMenu* GetMenu() const { return m_menu; }
|
||||
@@ -2418,9 +2418,9 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
|
||||
|
||||
// Miscellaneous
|
||||
#define EVT_SIZE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SIZE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxSizeEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_SIZING(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SIZING, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxSizeEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_SIZING(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_SIZING, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxSizeEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_MOVE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVE, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxMoveEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_MOVING(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVING, -1, -1, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxMoveEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_MOVING(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MOVING, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxMoveEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_CLOSE(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_CLOSE_WINDOW, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCloseEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_END_SESSION, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCloseEventFunction, & func ), (wxObject *) NULL ),
|
||||
#define EVT_QUERY_END_SESSION(func) DECLARE_EVENT_TABLE_ENTRY( wxEVT_QUERY_END_SESSION, wxID_ANY, wxID_ANY, (wxObjectEventFunction) (wxEventFunction) wxStaticCastEvent( wxCloseEventFunction, & func ), (wxObject *) NULL ),
|
||||
|
@@ -39,10 +39,10 @@ public:
|
||||
// exit from the loop with the given exit code
|
||||
virtual void Exit(int rc = 0) = 0;
|
||||
|
||||
// return TRUE if any events are available
|
||||
// return true if any events are available
|
||||
virtual bool Pending() const = 0;
|
||||
|
||||
// dispatch a single event, return FALSE if we should exit from the loop
|
||||
// dispatch a single event, return false if we should exit from the loop
|
||||
virtual bool Dispatch() = 0;
|
||||
|
||||
// is the event loop running now?
|
||||
|
@@ -122,5 +122,5 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap)
|
||||
}
|
||||
#endif // wxUSE_PALETTE
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
@@ -118,8 +118,8 @@ static CharsetItem* BuildReverseTable(wxUint16 *tbl)
|
||||
wxEncodingConverter::wxEncodingConverter()
|
||||
{
|
||||
m_Table = NULL;
|
||||
m_UnicodeInput = m_UnicodeOutput = FALSE;
|
||||
m_JustCopy = FALSE;
|
||||
m_UnicodeInput = m_UnicodeOutput = false;
|
||||
m_JustCopy = false;
|
||||
}
|
||||
|
||||
|
||||
@@ -132,17 +132,17 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
||||
if (m_Table) {delete[] m_Table; m_Table = NULL;}
|
||||
|
||||
#if !wxUSE_WCHAR_T
|
||||
if (input_enc == wxFONTENCODING_UNICODE || output_enc == wxFONTENCODING_UNICODE) return FALSE;
|
||||
if (input_enc == wxFONTENCODING_UNICODE || output_enc == wxFONTENCODING_UNICODE) return false;
|
||||
#endif
|
||||
|
||||
if (input_enc == output_enc) {m_JustCopy = TRUE; return TRUE;}
|
||||
if (input_enc == output_enc) {m_JustCopy = true; return true;}
|
||||
|
||||
m_UnicodeOutput = (output_enc == wxFONTENCODING_UNICODE);
|
||||
m_JustCopy = FALSE;
|
||||
m_JustCopy = false;
|
||||
|
||||
if (input_enc == wxFONTENCODING_UNICODE)
|
||||
{
|
||||
if ((out_tbl = GetEncTable(output_enc)) == NULL) return FALSE;
|
||||
if ((out_tbl = GetEncTable(output_enc)) == NULL) return false;
|
||||
|
||||
m_Table = new tchar[65536];
|
||||
for (i = 0; i < 128; i++) m_Table[i] = (tchar)i; // 7bit ASCII
|
||||
@@ -158,15 +158,15 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
||||
for (i = 0; i < 128; i++)
|
||||
m_Table[out_tbl[i]] = (tchar)(128 + i);
|
||||
|
||||
m_UnicodeInput = TRUE;
|
||||
m_UnicodeInput = true;
|
||||
}
|
||||
else // input !Unicode
|
||||
{
|
||||
if ((in_tbl = GetEncTable(input_enc)) == NULL) return FALSE;
|
||||
if ((in_tbl = GetEncTable(input_enc)) == NULL) return false;
|
||||
if (output_enc != wxFONTENCODING_UNICODE)
|
||||
if ((out_tbl = GetEncTable(output_enc)) == NULL) return FALSE;
|
||||
if ((out_tbl = GetEncTable(output_enc)) == NULL) return false;
|
||||
|
||||
m_UnicodeInput = FALSE;
|
||||
m_UnicodeInput = false;
|
||||
|
||||
m_Table = new tchar[256];
|
||||
for (i = 0; i < 128; i++) m_Table[i] = (tchar)i; // 7bit ASCII
|
||||
@@ -174,7 +174,7 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
||||
if (output_enc == wxFONTENCODING_UNICODE)
|
||||
{
|
||||
for (i = 0; i < 128; i++) m_Table[128 + i] = (tchar)in_tbl[i];
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
else // output !Unicode
|
||||
{
|
||||
@@ -203,7 +203,7 @@ bool wxEncodingConverter::Init(wxFontEncoding input_enc, wxFontEncoding output_e
|
||||
}
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
|
@@ -819,7 +819,7 @@ bool wxEventHashTable::HandleEvent(wxEvent &event, wxEvtHandler *self)
|
||||
}
|
||||
|
||||
if (!m_eventTypeTable)
|
||||
return FALSE;
|
||||
return false;
|
||||
|
||||
// Find all entries for the given event type.
|
||||
wxEventType eventType = event.GetEventType();
|
||||
@@ -1152,9 +1152,9 @@ wxEvtHandler::ProcessEventIfMatches(const wxEventTableEntryBase& entry,
|
||||
// the event table (meaning "any") or the event id matches the id
|
||||
// specified in the event table either exactly or by falling into
|
||||
// range between first and last
|
||||
if ((tableId1 == -1) ||
|
||||
(tableId2 == -1 && tableId1 == event.GetId()) ||
|
||||
(tableId2 != -1 &&
|
||||
if ((tableId1 == wxID_ANY) ||
|
||||
(tableId2 == wxID_ANY && tableId1 == event.GetId()) ||
|
||||
(tableId2 != wxID_ANY &&
|
||||
(event.GetId() >= tableId1 && event.GetId() <= tableId2)))
|
||||
{
|
||||
event.Skip(false);
|
||||
@@ -1304,7 +1304,7 @@ bool wxEvtHandler::Disconnect( int id, int lastId, wxEventType eventType,
|
||||
#endif // WXWIN_COMPATIBILITY_EVENT_TYPES/!WXWIN_COMPATIBILITY_EVENT_TYPES
|
||||
|
||||
if ((entry->m_id == id) &&
|
||||
((entry->m_lastId == lastId) || (lastId == -1)) &&
|
||||
((entry->m_lastId == lastId) || (lastId == wxID_ANY)) &&
|
||||
((entry->m_eventType == eventType) || (eventType == wxEVT_NULL)) &&
|
||||
((entry->m_fn == func) || (func == (wxObjectEventFunction)NULL)) &&
|
||||
((entry->m_eventSink == eventSink) || (eventSink == (wxEvtHandler*)NULL)) &&
|
||||
|
Reference in New Issue
Block a user