]> git.saurik.com Git - wxWidgets.git/commitdiff
Fixed resizing of wxTextCtrl
authorRobert Roebling <robert@roebling.de>
Mon, 16 Nov 1998 07:18:28 +0000 (07:18 +0000)
committerRobert Roebling <robert@roebling.de>
Mon, 16 Nov 1998 07:18:28 +0000 (07:18 +0000)
  Added clientdata to menu

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@1005 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/gtk/menu.h
include/wx/gtk1/menu.h
src/gtk/menu.cpp
src/gtk/textctrl.cpp
src/gtk1/menu.cpp
src/gtk1/textctrl.cpp

index 300a1918b87804b7a63c55ddf390c3bcbfe27ad5..9896ab085e281314164ffbd2daa49ebebeafafb6 100644 (file)
@@ -114,7 +114,11 @@ public:
   inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
   inline wxEvtHandler *GetEventHandler() { return m_eventHandler; }
   
-public:
+  inline void SetClientData( void* clientData ) { m_clientData = clientData; }
+  inline void* GetClientData() const { return m_clientData; }
+  
+// implementation
+  
   int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;
   void SetInvokingWindow( wxWindow *win );
   wxWindow *GetInvokingWindow();
@@ -124,6 +128,7 @@ public:
   wxWindow      *m_invokingWindow;
   wxFunction     m_callback;
   wxEvtHandler  *m_eventHandler;
+  void          *m_clientData;
 
   GtkWidget     *m_menu;  // GtkMenu
 };
index 300a1918b87804b7a63c55ddf390c3bcbfe27ad5..9896ab085e281314164ffbd2daa49ebebeafafb6 100644 (file)
@@ -114,7 +114,11 @@ public:
   inline void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
   inline wxEvtHandler *GetEventHandler() { return m_eventHandler; }
   
-public:
+  inline void SetClientData( void* clientData ) { m_clientData = clientData; }
+  inline void* GetClientData() const { return m_clientData; }
+  
+// implementation
+  
   int FindMenuIdByMenuItem( GtkWidget *menuItem ) const;
   void SetInvokingWindow( wxWindow *win );
   wxWindow *GetInvokingWindow();
@@ -124,6 +128,7 @@ public:
   wxWindow      *m_invokingWindow;
   wxFunction     m_callback;
   wxEvtHandler  *m_eventHandler;
+  void          *m_clientData;
 
   GtkWidget     *m_menu;  // GtkMenu
 };
index d01b340ad2fe35917bd47762db890d8b58107f2e..577e5fa2a436508fc626080fc0afbdbfa4da03a6 100644 (file)
@@ -262,8 +262,11 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func )
   m_items.DeleteContents( TRUE );
   m_invokingWindow = (wxWindow *) NULL;
   m_menu = gtk_menu_new();  // Do not show!
+  
   m_callback = func;
   m_eventHandler = this;
+  m_clientData = (void*) NULL;
+  
   if (m_title.IsNull()) m_title = "";
   if (m_title != "")
   {
index 127c5d9093d502b4338ddbe3cf48e8bf0a698120..b6033cce3a4d997992540767f5c3d57a25542e18 100644 (file)
@@ -84,7 +84,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
     // ... and put into the upper left hand corner of the table
     m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);
     gtk_table_attach( GTK_TABLE(m_widget), m_text, 0, 1, 0, 1,
-                      (GtkAttachOptions)(GTK_FILL | GTK_EXPAND),
+                      (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                        0, 0);
 
index d01b340ad2fe35917bd47762db890d8b58107f2e..577e5fa2a436508fc626080fc0afbdbfa4da03a6 100644 (file)
@@ -262,8 +262,11 @@ wxMenu::wxMenu( const wxString& title, const wxFunction func )
   m_items.DeleteContents( TRUE );
   m_invokingWindow = (wxWindow *) NULL;
   m_menu = gtk_menu_new();  // Do not show!
+  
   m_callback = func;
   m_eventHandler = this;
+  m_clientData = (void*) NULL;
+  
   if (m_title.IsNull()) m_title = "";
   if (m_title != "")
   {
index 127c5d9093d502b4338ddbe3cf48e8bf0a698120..b6033cce3a4d997992540767f5c3d57a25542e18 100644 (file)
@@ -84,7 +84,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
     // ... and put into the upper left hand corner of the table
     m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);
     gtk_table_attach( GTK_TABLE(m_widget), m_text, 0, 1, 0, 1,
-                      (GtkAttachOptions)(GTK_FILL | GTK_EXPAND),
+                      (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                        0, 0);