]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/osx/dataview.h
Start on Get/SetStyle support for OS X Cocoa wxTextCtrl.
[wxWidgets.git] / include / wx / osx / dataview.h
index e564a42b70dba9f2fd978ed201c93743635be19e..c7f9433b68c6916a9d642aded9d203770f76e529 100644 (file)
@@ -61,6 +61,9 @@ public:
     return true;
   }
 
+  virtual void EnableEllipsize(wxEllipsizeMode mode = wxELLIPSIZE_MIDDLE);
+  virtual wxEllipsizeMode GetEllipsizeMode() const;
+
 //
 // implementation
 //
@@ -79,6 +82,14 @@ public:
 
   void SetNativeData(wxDataViewRendererNativeData* newNativeDataPtr);
 
+
+#if wxOSX_USE_COCOA
+  // called when a value was edited by user
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 private:
 //
 // variables
@@ -186,7 +197,12 @@ public:
 //
   virtual bool MacRender();
 
-protected:
+#if wxOSX_USE_COCOA
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewTextRenderer)
 };
@@ -269,6 +285,12 @@ public:
 //
   virtual bool MacRender();
 
+#if wxOSX_USE_COCOA
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 protected:
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewIconTextRenderer)
@@ -288,7 +310,12 @@ public:
 //
   virtual bool MacRender();
 
-protected:
+#if wxOSX_USE_COCOA
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 private:
   DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewToggleRenderer)
 };
@@ -308,7 +335,12 @@ public:
 //
   virtual bool MacRender();
 
-protected:
+#if wxOSX_USE_COCOA
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewProgressRenderer)
 };
@@ -327,7 +359,12 @@ public:
 //
   virtual bool MacRender();
 
-protected:
+#if wxOSX_USE_COCOA
+  virtual void OSXOnCellChanged(NSObject *value,
+                                const wxDataViewItem& item,
+                                unsigned col);
+#endif // Cocoa
+
 private:
     DECLARE_DYNAMIC_CLASS_NO_COPY(wxDataViewDateRenderer)
 };
@@ -360,7 +397,7 @@ public:
     virtual int GetMaxWidth() const { return m_maxWidth; }
     virtual int GetMinWidth() const { return m_minWidth; }
     virtual wxString GetTitle() const { return m_title; }
-    virtual int GetWidth() const { return m_width; }
+    virtual int GetWidth() const;
     virtual bool IsHidden() const { return false; } // TODO
     virtual bool IsSortOrderAscending() const { return m_ascending; }
     virtual bool IsSortKey() const;
@@ -386,6 +423,10 @@ public:
     }
 
     void SetNativeData(wxDataViewColumnNativeData* newNativeDataPtr); // class takes ownership of pointer
+    int GetWidthVariable() const
+    {
+        return m_width;
+    }
     void SetWidthVariable(int NewWidth)
     {
         m_width = NewWidth;