Same changes as last commit... Maybe CVS works now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4701 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
e4c730e922
commit
b16088bf11
@ -170,9 +170,7 @@ enum {
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListItem: public wxObject
|
class WXDLLEXPORT wxListItem: public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListItem)
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
long m_mask; // Indicates what fields are valid
|
long m_mask; // Indicates what fields are valid
|
||||||
long m_itemId; // The zero-based item position
|
long m_itemId; // The zero-based item position
|
||||||
int m_col; // Zero-based column, if in report mode
|
int m_col; // Zero-based column, if in report mode
|
||||||
@ -188,6 +186,9 @@ class WXDLLEXPORT wxListItem: public wxObject
|
|||||||
int m_width; // width of column
|
int m_width; // width of column
|
||||||
|
|
||||||
wxListItem();
|
wxListItem();
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListItem)
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -236,9 +237,7 @@ private:
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListHeaderData : public wxObject
|
class WXDLLEXPORT wxListHeaderData : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListHeaderData);
|
protected:
|
||||||
|
|
||||||
protected:
|
|
||||||
long m_mask;
|
long m_mask;
|
||||||
int m_image;
|
int m_image;
|
||||||
wxString m_text;
|
wxString m_text;
|
||||||
@ -247,7 +246,7 @@ class WXDLLEXPORT wxListHeaderData : public wxObject
|
|||||||
int m_xpos,m_ypos;
|
int m_xpos,m_ypos;
|
||||||
int m_height;
|
int m_height;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListHeaderData();
|
wxListHeaderData();
|
||||||
wxListHeaderData( const wxListItem &info );
|
wxListHeaderData( const wxListItem &info );
|
||||||
void SetItem( const wxListItem &item );
|
void SetItem( const wxListItem &item );
|
||||||
@ -263,6 +262,9 @@ class WXDLLEXPORT wxListHeaderData : public wxObject
|
|||||||
int GetImage() const;
|
int GetImage() const;
|
||||||
int GetWidth() const;
|
int GetWidth() const;
|
||||||
int GetFormat() const;
|
int GetFormat() const;
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListHeaderData);
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -271,9 +273,7 @@ class WXDLLEXPORT wxListHeaderData : public wxObject
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListLineData : public wxObject
|
class WXDLLEXPORT wxListLineData : public wxObject
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListLineData);
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
wxList m_items;
|
wxList m_items;
|
||||||
wxRect m_bound_all;
|
wxRect m_bound_all;
|
||||||
wxRect m_bound_label;
|
wxRect m_bound_label;
|
||||||
@ -287,8 +287,8 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
|
|
||||||
void DoDraw( wxDC *dc, bool hilight, bool paintBG );
|
void DoDraw( wxDC *dc, bool hilight, bool paintBG );
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListLineData() {};
|
wxListLineData() {}
|
||||||
wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
|
wxListLineData( wxListMainWindow *owner, int mode, wxBrush *hilightBrush );
|
||||||
void CalculateSize( wxDC *dc, int spacing );
|
void CalculateSize( wxDC *dc, int spacing );
|
||||||
void SetPosition( wxDC *dc, int x, int y, int window_width );
|
void SetPosition( wxDC *dc, int x, int y, int window_width );
|
||||||
@ -312,6 +312,9 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
bool IsHilighted();
|
bool IsHilighted();
|
||||||
void AssignRect( wxRect &dest, int x, int y, int width, int height );
|
void AssignRect( wxRect &dest, int x, int y, int width, int height );
|
||||||
void AssignRect( wxRect &dest, const wxRect &source );
|
void AssignRect( wxRect &dest, const wxRect &source );
|
||||||
|
|
||||||
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListLineData);
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -320,9 +323,7 @@ class WXDLLEXPORT wxListLineData : public wxObject
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
|
protected:
|
||||||
|
|
||||||
protected:
|
|
||||||
wxListMainWindow *m_owner;
|
wxListMainWindow *m_owner;
|
||||||
wxCursor *m_currentCursor;
|
wxCursor *m_currentCursor;
|
||||||
wxCursor *m_resizeCursor;
|
wxCursor *m_resizeCursor;
|
||||||
@ -331,7 +332,7 @@ class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
|||||||
int m_minX;
|
int m_minX;
|
||||||
int m_currentX;
|
int m_currentX;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListHeaderWindow();
|
wxListHeaderWindow();
|
||||||
~wxListHeaderWindow();
|
~wxListHeaderWindow();
|
||||||
wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
|
wxListHeaderWindow( wxWindow *win, wxWindowID id, wxListMainWindow *owner,
|
||||||
@ -343,7 +344,9 @@ class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
|||||||
void OnMouse( wxMouseEvent &event );
|
void OnMouse( wxMouseEvent &event );
|
||||||
void OnSetFocus( wxFocusEvent &event );
|
void OnSetFocus( wxFocusEvent &event );
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListHeaderWindow)
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -352,12 +355,12 @@ class WXDLLEXPORT wxListHeaderWindow : public wxWindow
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListRenameTimer: public wxTimer
|
class WXDLLEXPORT wxListRenameTimer: public wxTimer
|
||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
wxListMainWindow *m_owner;
|
wxListMainWindow *m_owner;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListRenameTimer( wxListMainWindow *owner );
|
wxListRenameTimer( wxListMainWindow *owner );
|
||||||
void Notify();
|
void Notify();
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -366,16 +369,14 @@ class WXDLLEXPORT wxListRenameTimer: public wxTimer
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
|
private:
|
||||||
|
|
||||||
private:
|
|
||||||
bool *m_accept;
|
bool *m_accept;
|
||||||
wxString *m_res;
|
wxString *m_res;
|
||||||
wxListMainWindow *m_owner;
|
wxListMainWindow *m_owner;
|
||||||
wxString m_startValue;
|
wxString m_startValue;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListTextCtrl() {};
|
wxListTextCtrl() {}
|
||||||
wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
wxListTextCtrl( wxWindow *parent, const wxWindowID id,
|
||||||
bool *accept, wxString *res, wxListMainWindow *owner,
|
bool *accept, wxString *res, wxListMainWindow *owner,
|
||||||
const wxString &value = "",
|
const wxString &value = "",
|
||||||
@ -387,7 +388,9 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
|||||||
void OnChar( wxKeyEvent &event );
|
void OnChar( wxKeyEvent &event );
|
||||||
void OnKillFocus( wxFocusEvent &event );
|
void OnKillFocus( wxFocusEvent &event );
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListTextCtrl);
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -396,9 +399,7 @@ class WXDLLEXPORT wxListTextCtrl: public wxTextCtrl
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListMainWindow);
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
long m_mode;
|
long m_mode;
|
||||||
wxList m_lines;
|
wxList m_lines;
|
||||||
wxList m_columns;
|
wxList m_columns;
|
||||||
@ -423,7 +424,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
|||||||
int m_dragCount;
|
int m_dragCount;
|
||||||
wxPoint m_dragStart;
|
wxPoint m_dragStart;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
wxListMainWindow();
|
wxListMainWindow();
|
||||||
wxListMainWindow( wxWindow *parent, wxWindowID id,
|
wxListMainWindow( wxWindow *parent, wxWindowID id,
|
||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
@ -495,7 +496,9 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
|||||||
// void AddColumn( wxListItem &item );
|
// void AddColumn( wxListItem &item );
|
||||||
void SortItems( wxListCtrlCompare fn, long data );
|
void SortItems( wxListCtrlCompare fn, long data );
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListMainWindow);
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
};
|
};
|
||||||
|
|
||||||
//-----------------------------------------------------------------------------
|
//-----------------------------------------------------------------------------
|
||||||
@ -504,9 +507,7 @@ class WXDLLEXPORT wxListMainWindow: public wxScrolledWindow
|
|||||||
|
|
||||||
class WXDLLEXPORT wxListCtrl: public wxControl
|
class WXDLLEXPORT wxListCtrl: public wxControl
|
||||||
{
|
{
|
||||||
DECLARE_DYNAMIC_CLASS(wxListCtrl);
|
public:
|
||||||
|
|
||||||
public:
|
|
||||||
wxListCtrl();
|
wxListCtrl();
|
||||||
wxListCtrl( wxWindow *parent, wxWindowID id = -1,
|
wxListCtrl( wxWindow *parent, wxWindowID id = -1,
|
||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
@ -515,21 +516,23 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
#endif
|
#endif
|
||||||
const wxString &name = "listctrl" )
|
const wxString &name = "listctrl" )
|
||||||
{
|
{
|
||||||
Create(parent, id, pos, size, style, validator, name);
|
Create(parent, id, pos, size, style, validator, name);
|
||||||
}
|
}
|
||||||
~wxListCtrl();
|
~wxListCtrl();
|
||||||
|
|
||||||
bool Create( wxWindow *parent, wxWindowID id = -1,
|
bool Create( wxWindow *parent, wxWindowID id = -1,
|
||||||
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
const wxPoint &pos = wxDefaultPosition, const wxSize &size = wxDefaultSize,
|
||||||
#if wxUSE_VALIDATORS
|
#if wxUSE_VALIDATORS
|
||||||
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
long style = wxLC_ICON, const wxValidator& validator = wxDefaultValidator,
|
||||||
#endif
|
#endif
|
||||||
const wxString &name = "listctrl" );
|
const wxString &name = "listctrl" );
|
||||||
void OnSize( wxSizeEvent &event );
|
|
||||||
bool GetColumn( int col, wxListItem& item ) const;
|
bool GetColumn( int col, wxListItem& item ) const;
|
||||||
bool SetColumn( int col, wxListItem& item );
|
bool SetColumn( int col, wxListItem& item );
|
||||||
int GetColumnWidth( int col ) const;
|
int GetColumnWidth( int col ) const;
|
||||||
bool SetColumnWidth( int col, int width);
|
bool SetColumnWidth( int col, int width);
|
||||||
int GetCountPerPage() const; // not the same in wxGLC as in Windows, I think
|
int GetCountPerPage() const; // not the same in wxGLC as in Windows, I think
|
||||||
|
|
||||||
bool GetItem( wxListItem& info ) const;
|
bool GetItem( wxListItem& info ) const;
|
||||||
bool SetItem( wxListItem& info ) ;
|
bool SetItem( wxListItem& info ) ;
|
||||||
long SetItem( long index, int col, const wxString& label, int imageId = -1 );
|
long SetItem( long index, int col, const wxString& label, int imageId = -1 );
|
||||||
@ -551,6 +554,7 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
// wxColour GetTextColour() const; // wxGLC has colours for every Item (see wxListItem)
|
// wxColour GetTextColour() const; // wxGLC has colours for every Item (see wxListItem)
|
||||||
// void SetTextColour(const wxColour& col);
|
// void SetTextColour(const wxColour& col);
|
||||||
long GetTopItem() const;
|
long GetTopItem() const;
|
||||||
|
|
||||||
void SetSingleStyle( long style, bool add = TRUE ) ;
|
void SetSingleStyle( long style, bool add = TRUE ) ;
|
||||||
void SetWindowStyleFlag( long style );
|
void SetWindowStyleFlag( long style );
|
||||||
void RecreateWindow() {}
|
void RecreateWindow() {}
|
||||||
@ -583,7 +587,9 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
bool ScrollList( int dx, int dy );
|
bool ScrollList( int dx, int dy );
|
||||||
bool SortItems( wxListCtrlCompare fn, long data );
|
bool SortItems( wxListCtrlCompare fn, long data );
|
||||||
bool Update( long item );
|
bool Update( long item );
|
||||||
|
|
||||||
void OnIdle( wxIdleEvent &event );
|
void OnIdle( wxIdleEvent &event );
|
||||||
|
void OnSize( wxSizeEvent &event );
|
||||||
|
|
||||||
// We have to hand down a few functions
|
// We have to hand down a few functions
|
||||||
|
|
||||||
@ -607,14 +613,15 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
bool DoPopupMenu( wxMenu *menu, int x, int y )
|
bool DoPopupMenu( wxMenu *menu, int x, int y )
|
||||||
{ return m_mainWin->PopupMenu( menu, x, y ); }
|
{ return m_mainWin->PopupMenu( menu, x, y ); }
|
||||||
void SetFocus()
|
void SetFocus()
|
||||||
{
|
{
|
||||||
/* The test in window.cpp fails as we are a composite
|
/* The test in window.cpp fails as we are a composite
|
||||||
window, so it checks against "this", but not m_mainWin. */
|
window, so it checks against "this", but not m_mainWin. */
|
||||||
if(FindFocus() != this)
|
if (FindFocus() != this)
|
||||||
m_mainWin->SetFocus();
|
m_mainWin->SetFocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
// implementation
|
// implementation
|
||||||
|
// --------------
|
||||||
|
|
||||||
wxImageList *m_imageListNormal;
|
wxImageList *m_imageListNormal;
|
||||||
wxImageList *m_imageListSmall;
|
wxImageList *m_imageListSmall;
|
||||||
@ -622,8 +629,9 @@ class WXDLLEXPORT wxListCtrl: public wxControl
|
|||||||
wxListHeaderWindow *m_headerWin;
|
wxListHeaderWindow *m_headerWin;
|
||||||
wxListMainWindow *m_mainWin;
|
wxListMainWindow *m_mainWin;
|
||||||
|
|
||||||
DECLARE_EVENT_TABLE()
|
private:
|
||||||
|
DECLARE_EVENT_TABLE()
|
||||||
|
DECLARE_DYNAMIC_CLASS(wxListCtrl);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user