]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/ctrlsub.h
Initial work on virtual file system support for the WebKitGTK+ backend. It now suppor...
[wxWidgets.git] / include / wx / ctrlsub.h
index 109369b4890740bdc112ec3fb56b437d843e4cd2..82a98dfdfb835f9b1d39cc0a768aa9b8fca3c512 100644 (file)
@@ -122,7 +122,7 @@ private:
     int AppendItems(const wxArrayStringsAdapter& items, void **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
     int AppendItems(const wxArrayStringsAdapter& items, void **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
-                      _T("can't mix different types of client data") );
+                      wxT("can't mix different types of client data") );
 
         return AppendItems(items, clientData, wxClientData_Void);
     }
 
         return AppendItems(items, clientData, wxClientData_Void);
     }
@@ -131,7 +131,7 @@ private:
                     wxClientData **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
                     wxClientData **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
-                      _T("can't mix different types of client data") );
+                      wxT("can't mix different types of client data") );
 
         return AppendItems(items, reinterpret_cast<void **>(clientData),
                            wxClientData_Object);
 
         return AppendItems(items, reinterpret_cast<void **>(clientData),
                            wxClientData_Object);
@@ -142,17 +142,17 @@ private:
                     void **clientData,
                     wxClientDataType type)
     {
                     void **clientData,
                     wxClientDataType type)
     {
-        wxASSERT_MSG( !IsSorted(), _T("can't insert items in sorted control") );
+        wxASSERT_MSG( !IsSorted(), wxT("can't insert items in sorted control") );
 
         wxCHECK_MSG( pos <= GetCount(), wxNOT_FOUND,
 
         wxCHECK_MSG( pos <= GetCount(), wxNOT_FOUND,
-                     _T("position out of range") );
+                     wxT("position out of range") );
 
         // not all derived classes handle empty arrays correctly in
         // DoInsertItems() and besides it really doesn't make much sense to do
         // this (for append it could correspond to creating an initially empty
         // control but why would anybody need to insert 0 items?)
         wxCHECK_MSG( !items.IsEmpty(), wxNOT_FOUND,
 
         // not all derived classes handle empty arrays correctly in
         // DoInsertItems() and besides it really doesn't make much sense to do
         // this (for append it could correspond to creating an initially empty
         // control but why would anybody need to insert 0 items?)
         wxCHECK_MSG( !items.IsEmpty(), wxNOT_FOUND,
-                     _T("need something to insert") );
+                     wxT("need something to insert") );
 
         return DoInsertItems(items, pos, clientData, type);
     }
 
         return DoInsertItems(items, pos, clientData, type);
     }
@@ -167,7 +167,7 @@ private:
                      void **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
                      void **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Object,
-                      _T("can't mix different types of client data") );
+                      wxT("can't mix different types of client data") );
 
         return InsertItems(items, pos, clientData, wxClientData_Void);
     }
 
         return InsertItems(items, pos, clientData, wxClientData_Void);
     }
@@ -177,7 +177,7 @@ private:
                      wxClientData **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
                      wxClientData **clientData)
     {
         wxASSERT_MSG( GetClientDataType() != wxClientData_Void,
-                      _T("can't mix different types of client data") );
+                      wxT("can't mix different types of client data") );
 
         return InsertItems(items, pos,
                            reinterpret_cast<void **>(clientData),
 
         return InsertItems(items, pos,
                            reinterpret_cast<void **>(clientData),
@@ -296,8 +296,13 @@ public:
     void SetClientData(unsigned int n, void* clientData);
     void* GetClientData(unsigned int n) const;
 
     void SetClientData(unsigned int n, void* clientData);
     void* GetClientData(unsigned int n) const;
 
+    // SetClientObject() takes ownership of the pointer, GetClientObject()
+    // returns it but keeps the ownership while DetachClientObject() expects
+    // the caller to delete the pointer and also resets the internally stored
+    // one to NULL for this item
     void SetClientObject(unsigned int n, wxClientData* clientData);
     wxClientData* GetClientObject(unsigned int n) const;
     void SetClientObject(unsigned int n, wxClientData* clientData);
     wxClientData* GetClientObject(unsigned int n) const;
+    wxClientData* DetachClientObject(unsigned int n);
 
     // return the type of client data stored in this control: usually it just
     // returns m_clientDataItemsType but must be overridden in the controls
 
     // return the type of client data stored in this control: usually it just
     // returns m_clientDataItemsType but must be overridden in the controls
@@ -437,7 +442,7 @@ protected:
     void InitCommandEventWithItems(wxCommandEvent& event, int n);
 
 private:
     void InitCommandEventWithItems(wxCommandEvent& event, int n);
 
 private:
-    DECLARE_NO_COPY_CLASS(wxControlWithItemsBase)
+    wxDECLARE_NO_COPY_CLASS(wxControlWithItemsBase);
 };
 
 // define the platform-specific wxControlWithItems class
 };
 
 // define the platform-specific wxControlWithItems class
@@ -453,7 +458,7 @@ private:
 
     private:
         DECLARE_ABSTRACT_CLASS(wxControlWithItems)
 
     private:
         DECLARE_ABSTRACT_CLASS(wxControlWithItems)
-        DECLARE_NO_COPY_CLASS(wxControlWithItems)
+        wxDECLARE_NO_COPY_CLASS(wxControlWithItems);
     };
 #endif
 
     };
 #endif