]> git.saurik.com Git - wxWidgets.git/blobdiff - src/motif/textctrl.cpp
SetBackground for ListBox and others
[wxWidgets.git] / src / motif / textctrl.cpp
index d62cac41f6e856f13b822bb8574b7a60798b85ae..3016f39932e89083a0afe5cdc61c7be08858e65a 100644 (file)
@@ -67,7 +67,6 @@ wxTextCtrl::wxTextCtrl()
     m_tempCallbackStruct = (void*) NULL;
     m_modified = FALSE;
     m_processedDefault = FALSE;
-    m_inSetValue = FALSE;
 }
 
 bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
@@ -81,7 +80,8 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
     m_modified = FALSE;
     m_processedDefault = FALSE;
     m_fileName = "";
-    m_inSetValue = FALSE;
+    m_backgroundColour = parent->GetBackgroundColour();
+    m_foregroundColour = parent->GetForegroundColour();
 
     SetName(name);
     SetValidator(validator);
@@ -147,7 +147,7 @@ bool wxTextCtrl::Create(wxWindow *parent, wxWindowID id,
     AttachWidget (parent, m_mainWidget, (WXWidget) NULL, pos.x, pos.y, size.x, size.y);
 
     SetFont(* parent->GetFont());
-    ChangeColour(m_mainWidget);
+    ChangeBackgroundColour();
 
     return TRUE;
 }
@@ -619,6 +619,21 @@ void wxTextCtrl::OnChar(wxKeyEvent& event)
   }
 }
 
+void wxTextCtrl::ChangeFont()
+{
+    // TODO
+}
+
+void wxTextCtrl::ChangeBackgroundColour()
+{
+    // TODO
+}
+
+void wxTextCtrl::ChangeForegroundColour()
+{
+    // TODO
+}
+
 static void wxTextWindowChangedProc (Widget w, XtPointer clientData, XtPointer ptr)
 {
   if (!wxGetWindowFromTable(w))
@@ -718,7 +733,7 @@ wxTextWindowModifyProc (Widget w, XtPointer clientData, XmTextVerifyCallbackStru
 
         tw->m_tempCallbackStruct = NULL;
 
-        if (tw->m_inSetValue)
+        if (tw->InSetValue())
             return;
     
         if (tw->m_processedDefault)
@@ -757,7 +772,7 @@ wxTextWindowModifyProc (Widget w, XtPointer clientData, XmTextVerifyCallbackStru
 
     tw->m_tempCallbackStruct = NULL;
 
-    if (tw->m_inSetValue)
+    if (tw->InSetValue())
         return;
     
     if (tw->m_processedDefault)
@@ -810,7 +825,7 @@ static void wxTextWindowActivateProc(Widget w, XtPointer clientData,
   }
   */
 
-  if (tw->m_inSetValue)
+  if (tw->InSetValue())
     return;
     
   wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER);