]> git.saurik.com Git - wxWidgets.git/commitdiff
Source cleaning: tabs, whitespaces, -1/wxID_ANY, TRUE/true, FALSE/false.
authorWłodzimierz Skiba <abx@abx.art.pl>
Mon, 13 Sep 2004 18:03:44 +0000 (18:03 +0000)
committerWłodzimierz Skiba <abx@abx.art.pl>
Mon, 13 Sep 2004 18:03:44 +0000 (18:03 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@29123 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/effects.h
include/wx/encconv.h
include/wx/event.h
include/wx/evtloop.h
src/common/effects.cpp
src/common/encconv.cpp
src/common/event.cpp

index a051c857feac3d2abc3583244f96020ef123b986..bdafbe170d1c8deaf8b58113683578480b48a27d 100644 (file)
@@ -7,7 +7,7 @@
 // Created:     25/4/2000
 // RCS-ID:      $Id$
 // Copyright:   (c) Julian Smart
-// Licence:    wxWindows licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
index f950f634cbf78718fae4dc674e177535bc6a16bb..3c6b65e89e7eb0304ac578be161b26b82716084b 100644 (file)
@@ -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.)
index 538f13e9abaf43e2db7b7057f6b61dfc817f14c2..4aabe99a4078fec4f475cad28c626b62933ae557 100644 (file)
@@ -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 ),
index bc8ea3d0771e1366980c8e0089cb36264400673d..42b00f2d03f85a03d350f96017cd2848e64c6115 100644 (file)
@@ -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?
@@ -83,7 +83,7 @@ class WXDLLEXPORT wxEventLoop : public wxEventLoopBase
 public:
     wxEventLoop() { m_impl = NULL; }
     virtual ~wxEventLoop();
-    
+
     virtual int Run();
     virtual void Exit(int rc = 0);
     virtual bool Pending() const;
index 454cde208166720dc77568694fc9919ca465e737..f1d31dd0b3a2d562f6377012a5cbb560b713c4cb 100644 (file)
@@ -122,5 +122,5 @@ bool wxEffects::TileBitmap(const wxRect& rect, wxDC& dc, wxBitmap& bitmap)
     }
 #endif // wxUSE_PALETTE
 
-    return TRUE;
+    return true;
 }
index 70f145b5c556b614cbe0a6f341340071f72921a5..dd7c28d52048b3a26fea28ff36207fa5bf8c3f84 100644 (file)
@@ -63,19 +63,19 @@ static wxUint16* GetEncTable(wxFontEncoding enc)
         {
             TECObjectRef converter ;
             TextEncodingBase code = wxMacGetSystemEncFromFontEnc( enc ) ;
-               TextEncodingBase unicode = CreateTextEncoding(kTextEncodingUnicodeDefault,0,kUnicode16BitFormat) ;
-           OSStatus status = TECCreateConverter(&converter,code,unicode);
-           char s[2] ;
-           s[1] = 0 ;
-           ByteCount byteInLen, byteOutLen ;
-           for( unsigned char c = 255 ; c >= 128 ; --c )
-           {
-               s[0] = c ;
+            TextEncodingBase unicode = CreateTextEncoding(kTextEncodingUnicodeDefault,0,kUnicode16BitFormat) ;
+            OSStatus status = TECCreateConverter(&converter,code,unicode);
+            char s[2] ;
+            s[1] = 0 ;
+            ByteCount byteInLen, byteOutLen ;
+            for( unsigned char c = 255 ; c >= 128 ; --c )
+            {
+                s[0] = c ;
                 status = TECConvertText(converter, (ConstTextPtr) &s , 1, &byteInLen,
                 (TextPtr) &gMacEncodings[i][c-128] , 2, &byteOutLen);
-           }
+            }
             status = TECDisposeConverter(converter);
-            gMacEncodingsInited[i]=true;       
+            gMacEncodingsInited[i]=true;
         }
         return gMacEncodings[i] ;
     }
@@ -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;
 }
 
 
index 8492fd3ec03f83479aea1d382a7da10b3fe4b91d..2962ea721b2e10b9df2eed6b1464bb1e487430b0 100644 (file)
@@ -120,7 +120,7 @@ wxEventHashTable wxEvtHandler::sm_eventHashTable(wxEvtHandler::sm_eventTable);
 const wxEventTableEntry wxEvtHandler::sm_eventTableEntries[] =
     { DECLARE_EVENT_TABLE_ENTRY(wxEVT_NULL, 0, 0, (wxObjectEventFunction)NULL, NULL) };
 
-    
+
 #ifdef __WXDEBUG__
 // Clear up event hash table contents or we can get problems
 // when C++ is cleaning up the static object
@@ -137,7 +137,7 @@ public:
 };
 IMPLEMENT_DYNAMIC_CLASS(wxEventTableEntryModule, wxModule)
 #endif
-    
+
 // ----------------------------------------------------------------------------
 // global variables
 // ----------------------------------------------------------------------------
@@ -759,7 +759,7 @@ wxEventHashTable::wxEventHashTable(const wxEventTable &table)
                   m_rebuildHash(true)
 {
     AllocEventTypeTable(EVENT_TYPE_TABLE_INIT_SIZE);
-    
+
     m_next = sm_first;
     if (m_next)
         m_next->m_previous = this;
@@ -774,7 +774,7 @@ wxEventHashTable::~wxEventHashTable()
         m_previous->m_next = m_next;
     if (sm_first == this)
         sm_first = m_next;
-    
+
     Clear();
 }
 
@@ -817,9 +817,9 @@ bool wxEventHashTable::HandleEvent(wxEvent &event, wxEvtHandler *self)
         InitHashTable();
         m_rebuildHash = false;
     }
-    
+
     if (!m_eventTypeTable)
-        return FALSE;
+        return false;
 
     // Find all entries for the given event type.
     wxEventType eventType = event.GetEventType();
@@ -881,7 +881,7 @@ void wxEventHashTable::AddEntry(const wxEventTableEntry &entry)
     // This might happen 'accidentally' as the app is exiting
     if (!m_eventTypeTable)
         return;
-    
+
     EventTypeTablePointer *peTTnode = &m_eventTypeTable[entry.m_eventType % m_size];
     EventTypeTablePointer  eTTnode = *peTTnode;
 
@@ -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)) &&