many fixes to wxTextCrtl, wxTreeCrtl, wxListBox,
wxDialog, wxFrame two more samples work now, docview and treectrl git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -40,6 +40,13 @@
|
||||
#define wxIMAGELIST_DRAW_SELECTED 0x0004
|
||||
#define wxIMAGELIST_DRAW_FOCUSED 0x0008
|
||||
|
||||
// Flag values for Set/GetImageList
|
||||
enum {
|
||||
wxIMAGE_LIST_NORMAL, // Normal icons
|
||||
wxIMAGE_LIST_SMALL, // Small icons
|
||||
wxIMAGE_LIST_STATE // State icons: unimplemented (see WIN32 documentation)
|
||||
};
|
||||
|
||||
class wxImageList: public wxObject
|
||||
{
|
||||
DECLARE_DYNAMIC_CLASS(wxImageList)
|
||||
|
@@ -276,6 +276,9 @@ public:
|
||||
void DeleteItem( long item );
|
||||
void DeleteChildren( long item );
|
||||
bool DeleteAllItems();
|
||||
bool ExpandItem(long item) { return ExpandItem(item, wxTREE_EXPAND_EXPAND); }
|
||||
bool CollapseItem(long item) { return ExpandItem(item, wxTREE_EXPAND_COLLAPSE); }
|
||||
bool ToggleItem(long item) { return ExpandItem(item, wxTREE_EXPAND_TOGGLE); }
|
||||
bool ExpandItem( long item, int action );
|
||||
bool GetItem( wxTreeItem &info ) const;
|
||||
long GetItemData( long item ) const;
|
||||
@@ -302,9 +305,9 @@ public:
|
||||
void OnChar( wxKeyEvent &event );
|
||||
void OnMouse( const wxMouseEvent &event );
|
||||
|
||||
void SetImageList(wxImageList *imageList) { m_imageList = imageList; }
|
||||
wxImageList *GetImageList() const { return m_imageList; }
|
||||
|
||||
wxImageList *GetImageList(int which = wxIMAGE_LIST_NORMAL) const;
|
||||
void SetImageList(wxImageList *imageList, int which = wxIMAGE_LIST_NORMAL);
|
||||
|
||||
private:
|
||||
wxGenericTreeItem *m_anchor;
|
||||
wxGenericTreeItem *m_current;
|
||||
@@ -318,6 +321,7 @@ private:
|
||||
wxPaintDC *m_dc;
|
||||
wxBrush *m_hilightBrush;
|
||||
wxImageList *m_imageList;
|
||||
wxImageList *m_smallImageList;
|
||||
|
||||
void CalculateLevel( wxGenericTreeItem *item, wxPaintDC &dc, int level, int &y );
|
||||
void CalculatePositions();
|
||||
|
@@ -65,6 +65,7 @@ class wxDialog: public wxWindow
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOk( wxCommandEvent &event );
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
bool Destroy(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
/*
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
@@ -74,11 +75,6 @@ class wxDialog: public wxWindow
|
||||
virtual void EndModal(int retCode);
|
||||
virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
virtual void InitDialog(void);
|
||||
/*
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
*/
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -69,10 +69,13 @@ class wxFrame: public wxWindow
|
||||
void SetTitle( const wxString &title );
|
||||
wxString GetTitle(void) const;
|
||||
void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
|
||||
//private:
|
||||
|
||||
void GtkOnSize( int x, int y, int width, int height );
|
||||
void DoMenuUpdates(void);
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -76,6 +76,7 @@ class wxListBox: public wxControl
|
||||
private:
|
||||
|
||||
GtkList *m_list;
|
||||
wxList m_clientData;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -29,6 +29,12 @@ class wxMenuBar;
|
||||
class wxMenuItem;
|
||||
class wxMenu;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// const
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define ID_SEPARATOR (-1)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuBar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -69,6 +75,14 @@ class wxMenuItem: public wxObject
|
||||
wxString m_helpStr;
|
||||
|
||||
GtkWidget *m_menuItem; // GtkMenuItem
|
||||
|
||||
bool IsSeparator() const { return m_id == ID_SEPARATOR; }
|
||||
bool IsEnabled() const { return m_isEnabled; }
|
||||
bool IsChecked() const { return m_checked; }
|
||||
|
||||
int GetId() const { return m_id; }
|
||||
const wxString& GetHelp() const { return m_helpStr; }
|
||||
wxMenu *GetSubMenu() const { return m_subMenu; }
|
||||
|
||||
};
|
||||
|
||||
@@ -86,6 +100,7 @@ class wxMenu: public wxEvtHandler
|
||||
wxMenu *subMenu, const wxString &helpStr = "" );
|
||||
int FindItem( const wxString itemString ) const;
|
||||
void Break(void) {};
|
||||
void Check(int id, bool Flag);
|
||||
void Enable( int id, bool enable );
|
||||
bool Enabled( int id ) const;
|
||||
void SetLabel( int id, const wxString &label );
|
||||
|
@@ -65,6 +65,7 @@ class wxDialog: public wxWindow
|
||||
void OnCancel( wxCommandEvent &event );
|
||||
void OnOk( wxCommandEvent &event );
|
||||
void OnPaint(wxPaintEvent& event);
|
||||
bool Destroy(void);
|
||||
void OnCloseWindow(wxCloseEvent& event);
|
||||
/*
|
||||
void OnCharHook(wxKeyEvent& event);
|
||||
@@ -74,11 +75,6 @@ class wxDialog: public wxWindow
|
||||
virtual void EndModal(int retCode);
|
||||
virtual bool IsModal(void) const { return ((GetWindowStyleFlag() & wxDIALOG_MODAL) == wxDIALOG_MODAL); }
|
||||
virtual void InitDialog(void);
|
||||
/*
|
||||
void OnOK(wxCommandEvent& event);
|
||||
void OnApply(wxCommandEvent& event);
|
||||
void OnCancel(wxCommandEvent& event);
|
||||
*/
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -69,10 +69,13 @@ class wxFrame: public wxWindow
|
||||
void SetTitle( const wxString &title );
|
||||
wxString GetTitle(void) const;
|
||||
void OnActivate( wxActivateEvent &WXUNUSED(event) ) {};
|
||||
void OnIdle( wxIdleEvent &event );
|
||||
|
||||
//private:
|
||||
|
||||
void GtkOnSize( int x, int y, int width, int height );
|
||||
void DoMenuUpdates(void);
|
||||
void DoMenuUpdates(wxMenu* menu);
|
||||
|
||||
private:
|
||||
|
||||
|
@@ -76,6 +76,7 @@ class wxListBox: public wxControl
|
||||
private:
|
||||
|
||||
GtkList *m_list;
|
||||
wxList m_clientData;
|
||||
|
||||
public:
|
||||
|
||||
|
@@ -29,6 +29,12 @@ class wxMenuBar;
|
||||
class wxMenuItem;
|
||||
class wxMenu;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// const
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
#define ID_SEPARATOR (-1)
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
// wxMenuBar
|
||||
//-----------------------------------------------------------------------------
|
||||
@@ -69,6 +75,14 @@ class wxMenuItem: public wxObject
|
||||
wxString m_helpStr;
|
||||
|
||||
GtkWidget *m_menuItem; // GtkMenuItem
|
||||
|
||||
bool IsSeparator() const { return m_id == ID_SEPARATOR; }
|
||||
bool IsEnabled() const { return m_isEnabled; }
|
||||
bool IsChecked() const { return m_checked; }
|
||||
|
||||
int GetId() const { return m_id; }
|
||||
const wxString& GetHelp() const { return m_helpStr; }
|
||||
wxMenu *GetSubMenu() const { return m_subMenu; }
|
||||
|
||||
};
|
||||
|
||||
@@ -86,6 +100,7 @@ class wxMenu: public wxEvtHandler
|
||||
wxMenu *subMenu, const wxString &helpStr = "" );
|
||||
int FindItem( const wxString itemString ) const;
|
||||
void Break(void) {};
|
||||
void Check(int id, bool Flag);
|
||||
void Enable( int id, bool enable );
|
||||
bool Enabled( int id ) const;
|
||||
void SetLabel( int id, const wxString &label );
|
||||
|
Reference in New Issue
Block a user