source: filezilla/trunk/fuentes/src/interface/splitter.h @ 130

Last change on this file since 130 was 130, checked in by jrpelegrina, 3 years ago

First release to xenial

File size: 1.5 KB
Line 
1#ifndef __SPLITTER_H__
2#define __SPLITTER_H__
3
4class CSplitterWindowEx : public wxSplitterWindow
5{
6public:
7        CSplitterWindowEx();
8        CSplitterWindowEx(wxWindow* parent, wxWindowID id, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, const wxString& name = _T("splitterWindow"));
9
10        bool Create(wxWindow* parent, wxWindowID id, const wxPoint& point = wxDefaultPosition, const wxSize& size = wxDefaultSize, long style = wxSP_3D, const wxString& name = _T("splitterWindow"));
11
12        void SetSashGravity(double gravity);
13
14        // If pane size goes below paneSize_soft, make sure both panes are equally large
15        void SetMinimumPaneSize(int paneSize, int paneSize_soft = -1);
16
17        int GetSashPosition() const;
18        void SetSashPosition(int sash_position);
19        void SetRelativeSashPosition(double relative_sash_position);
20        double GetRelativeSashPosition() const { return m_relative_sash_position; }
21
22        void Initialize(wxWindow *window);
23
24        bool SplitHorizontally(wxWindow* window1, wxWindow* window2, int sashPosition = 0);
25        bool SplitVertically(wxWindow* window1, wxWindow* window2, int sashPosition = 0);
26
27        bool Unsplit(wxWindow* toRemove = NULL);
28
29protected:
30        void PrepareSplit(wxWindow* window1, wxWindow* window2, int & sashPosition, bool horizontal);
31
32        virtual int OnSashPositionChanging(int newSashPosition);
33
34        int CalcSoftLimit(int newSashPosition);
35
36        DECLARE_CLASS(CSplitterWindowEx)
37
38        DECLARE_EVENT_TABLE()
39        void OnSize(wxSizeEvent& event);
40
41        double m_relative_sash_position;
42
43        int m_soft_min_pane_size;
44
45        int m_lastSashPosition;
46};
47
48#endif //__SPLITTER_H__
Note: See TracBrowser for help on using the repository browser.