Implemented DoGetBestSize for wxListBox, (native) wxComboBox and
wxTextCtrl, and used it when wxSize(-1, -1) is passed to Create, to set the initial size. Added wxDoChangeFont and wxXmStringToString helper functions, removed the use of m_stringList in native wxComboBox, removed some duplicated code in wxWindow. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@19296 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -91,6 +91,9 @@ protected:
|
||||
virtual void DoSetSize(int x, int y,
|
||||
int width, int height,
|
||||
int sizeFlags = wxSIZE_AUTO);
|
||||
private:
|
||||
// only implemented for native combo box
|
||||
void AdjustDropDownListSize();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
@@ -88,6 +88,8 @@ public:
|
||||
virtual void DoToggleItem(int item, int x) {};
|
||||
#endif
|
||||
protected:
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
|
||||
int m_noItems;
|
||||
|
||||
// List mapping positions->client data
|
||||
|
@@ -64,6 +64,7 @@ extern void wxDoChangeForegroundColour(WXWidget widget,
|
||||
extern void wxDoChangeBackgroundColour(WXWidget widget,
|
||||
wxColour& backgroundColour,
|
||||
bool changeArmColour = FALSE);
|
||||
extern void wxDoChangeFont(WXWidget widget, wxFont& font);
|
||||
|
||||
#define wxNO_COLORS 0x00
|
||||
#define wxBACK_COLORS 0x01
|
||||
@@ -107,13 +108,20 @@ private:
|
||||
XmString m_string;
|
||||
};
|
||||
|
||||
wxString wxXmStringToString( const XmString& xmString );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// Routines used in both wxTextCtrl/wxListBox and nativa wxComboBox
|
||||
// (defined in src/motif/listbox.cpp or src/motif/textctrl.cpp
|
||||
// ----------------------------------------------------------------------------
|
||||
|
||||
int wxDoFindStringInList( Widget listWidget, const wxString& str );
|
||||
int wxDoGetSelectionInList(Widget listWidget);
|
||||
int wxDoGetSelectionInList( Widget listWidget );
|
||||
wxString wxDoGetStringInList( Widget listWidget, int n );
|
||||
wxSize wxDoGetListBoxBestSize( Widget listWidget, const wxWindow* window );
|
||||
|
||||
wxSize wxDoGetSingleTextCtrlBestSize( Widget textWidget,
|
||||
const wxWindow* window );
|
||||
|
||||
// ----------------------------------------------------------------------------
|
||||
// executes one main loop iteration (implemented in src/motif/evtloop.cpp)
|
||||
|
@@ -133,7 +133,8 @@ public:
|
||||
|
||||
protected:
|
||||
wxString m_fileName;
|
||||
|
||||
|
||||
virtual wxSize DoGetBestSize() const;
|
||||
public:
|
||||
// Motif-specific
|
||||
void* m_tempCallbackStruct;
|
||||
|
Reference in New Issue
Block a user