2006-10-22 18:28:37 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Name: wx/gtk/collpane.h
|
|
|
|
// Purpose: wxCollapsiblePane
|
|
|
|
// Author: Francesco Montorsi
|
|
|
|
// Modified by:
|
|
|
|
// Created: 8/10/2006
|
|
|
|
// Copyright: (c) Francesco Montorsi
|
|
|
|
// Licence: wxWindows Licence
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
#ifndef _WX_COLLAPSABLE_PANEL_H_GTK_
|
|
|
|
#define _WX_COLLAPSABLE_PANEL_H_GTK_
|
|
|
|
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
// wxCollapsiblePane
|
|
|
|
// ----------------------------------------------------------------------------
|
|
|
|
|
2007-11-05 17:31:24 -05:00
|
|
|
class WXDLLIMPEXP_CORE wxCollapsiblePane : public wxCollapsiblePaneBase
|
2006-10-22 18:28:37 -04:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
wxCollapsiblePane() { Init(); }
|
|
|
|
|
|
|
|
wxCollapsiblePane(wxWindow *parent,
|
|
|
|
wxWindowID winid,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2006-11-11 02:32:08 -05:00
|
|
|
long style = wxCP_DEFAULT_STYLE,
|
2006-10-22 18:28:37 -04:00
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCollapsiblePaneNameStr)
|
|
|
|
{
|
|
|
|
Init();
|
|
|
|
|
|
|
|
Create(parent, winid, label, pos, size, style, val, name);
|
|
|
|
}
|
|
|
|
|
|
|
|
bool Create(wxWindow *parent,
|
|
|
|
wxWindowID winid,
|
|
|
|
const wxString& label,
|
|
|
|
const wxPoint& pos = wxDefaultPosition,
|
|
|
|
const wxSize& size = wxDefaultSize,
|
2006-11-11 02:32:08 -05:00
|
|
|
long style = wxCP_DEFAULT_STYLE,
|
2006-10-22 18:28:37 -04:00
|
|
|
const wxValidator& val = wxDefaultValidator,
|
|
|
|
const wxString& name = wxCollapsiblePaneNameStr);
|
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void Collapse(bool collapse = true) wxOVERRIDE;
|
|
|
|
virtual bool IsCollapsed() const wxOVERRIDE;
|
|
|
|
virtual void SetLabel(const wxString& str) wxOVERRIDE;
|
2007-11-05 17:31:24 -05:00
|
|
|
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxWindow *GetPane() const wxOVERRIDE { return m_pPane; }
|
|
|
|
virtual wxString GetLabel() const wxOVERRIDE { return m_strLabel; }
|
2006-10-22 18:28:37 -04:00
|
|
|
|
2006-12-07 02:22:55 -05:00
|
|
|
protected:
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual wxSize DoGetBestSize() const wxOVERRIDE;
|
2006-10-22 18:28:37 -04:00
|
|
|
|
|
|
|
public: // used by GTK callbacks
|
|
|
|
bool m_bIgnoreNextChange;
|
|
|
|
wxSize m_szCollapsed;
|
|
|
|
|
2007-11-05 17:31:24 -05:00
|
|
|
wxWindow *m_pPane;
|
|
|
|
|
|
|
|
// the button label without ">>" or "<<"
|
|
|
|
wxString m_strLabel;
|
|
|
|
|
2006-10-22 18:28:37 -04:00
|
|
|
private:
|
2012-10-02 11:57:03 -04:00
|
|
|
void Init()
|
|
|
|
{
|
|
|
|
m_bIgnoreNextChange = false;
|
|
|
|
}
|
|
|
|
|
2006-12-07 02:22:55 -05:00
|
|
|
void OnSize(wxSizeEvent&);
|
2014-03-29 20:02:23 -04:00
|
|
|
virtual void AddChildGTK(wxWindowGTK* child) wxOVERRIDE;
|
|
|
|
GdkWindow *GTKGetWindow(wxArrayGdkWindows& windows) const wxOVERRIDE;
|
2006-12-07 02:22:55 -05:00
|
|
|
|
2015-04-23 07:49:01 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS(wxCollapsiblePane);
|
|
|
|
wxDECLARE_EVENT_TABLE();
|
2006-10-22 18:28:37 -04:00
|
|
|
};
|
|
|
|
|
2006-12-07 02:22:55 -05:00
|
|
|
#endif // _WX_COLLAPSABLE_PANEL_H_GTK_
|