#include <floatpane.h>
Public Member Functions | |
wxAuiFloatingFrame (wxWindow *parent, wxAuiManager *owner_mgr, const wxAuiPaneInfo &pane, wxWindowID id=wxID_ANY) | |
~wxAuiFloatingFrame () | |
void | SetPaneWindow (const wxAuiPaneInfo &pane) |
Private Member Functions | |
void | OnSize (wxSizeEvent &event) |
void | OnClose (wxCloseEvent &event) |
void | OnMoveEvent (wxMoveEvent &event) |
void | OnIdle (wxIdleEvent &event) |
void | OnMoveStart () |
void | OnMoving (const wxRect &window_rect) |
void | OnMoveFinished () |
void | OnActivate (wxActivateEvent &event) |
Static Private Member Functions | |
static bool | isMouseDown () |
Private Attributes | |
wxWindow * | m_pane_window |
bool | m_moving |
wxRect | m_last_rect |
wxSize | m_last_size |
wxAuiManager * | m_owner_mgr |
wxAuiManager | m_mgr |
Definition at line 36 of file floatpane.h.
|
Definition at line 28 of file floatpane.cpp. 00032 : wxAuiFloatingFrameBaseClass(parent, id, wxEmptyString, 00033 pane.floating_pos, pane.floating_size, 00034 wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION | 00035 (pane.HasCloseButton()?wxCLOSE_BOX:0) | 00036 wxFRAME_NO_TASKBAR | 00037 wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN | 00038 (pane.IsFixed()?0:wxRESIZE_BORDER) 00039 ) 00040 { 00041 m_owner_mgr = owner_mgr; 00042 m_moving = false; 00043 m_last_rect = wxRect(); 00044 m_mgr.SetManagedWindow(this); 00045 SetExtraStyle(wxWS_EX_PROCESS_IDLE); 00046 }
|
|
Definition at line 48 of file floatpane.cpp.
|
|
Definition at line 205 of file floatpane.cpp.
|
|
Definition at line 193 of file floatpane.cpp. 00194 { 00195 if (event.GetActive()) 00196 { 00197 m_owner_mgr->OnFloatingPaneActivated(m_pane_window); 00198 } 00199 }
|
|
Definition at line 110 of file floatpane.cpp. 00111 { 00112 m_owner_mgr->OnFloatingPaneClosed(m_pane_window, evt); 00113 if (!evt.GetVeto()) 00114 Destroy(); 00115 }
|
|
Definition at line 159 of file floatpane.cpp. 00160 { 00161 if (m_moving) 00162 { 00163 if (!isMouseDown()) 00164 { 00165 m_moving = false; 00166 OnMoveFinished(); 00167 } 00168 else 00169 { 00170 event.RequestMore(); 00171 } 00172 } 00173 }
|
|
Definition at line 117 of file floatpane.cpp. 00118 { 00119 #ifdef __WXGTK__ 00120 // On wxGTK 2.6 and 2.7 for some unknown reason, wxSizeEvents are not 00121 // emitted for wxAuiFloatingFrames when they are manually resized. 00122 // See Bug #1528554. 00123 // However, it does (fortunately) wrongly emit wxMoveEvent in this scenario. 00124 // So we having on that to update the floating pane size - let's hope noone 00125 // fixes this useful bug, without fixing the above. 00126 m_owner_mgr->OnFloatingPaneResized(m_pane_window, GetSize()); 00127 #endif 00128 00129 wxRect win_rect = GetRect(); 00130 00131 // skip the first move event 00132 if (m_last_rect.IsEmpty()) 00133 { 00134 m_last_rect = win_rect; 00135 return; 00136 } 00137 00138 // prevent frame redocking during resize 00139 if (m_last_rect.GetSize() != win_rect.GetSize()) 00140 { 00141 m_last_rect = win_rect; 00142 return; 00143 } 00144 00145 m_last_rect = win_rect; 00146 00147 if (!isMouseDown()) 00148 return; 00149 00150 if (!m_moving) 00151 { 00152 OnMoveStart(); 00153 m_moving = true; 00154 } 00155 00156 OnMoving(event.GetRect()); 00157 }
|
|
Definition at line 187 of file floatpane.cpp. 00188 { 00189 // notify the owner manager that the pane has finished moving 00190 m_owner_mgr->OnFloatingPaneMoved(m_pane_window); 00191 }
|
|
Definition at line 175 of file floatpane.cpp. 00176 { 00177 // notify the owner manager that the pane has started to move 00178 m_owner_mgr->OnFloatingPaneMoveStart(m_pane_window); 00179 }
|
|
|
|
Definition at line 105 of file floatpane.cpp. 00106 { 00107 m_owner_mgr->OnFloatingPaneResized(m_pane_window, event.GetSize()); 00108 }
|
|
Definition at line 53 of file floatpane.cpp. 00054 { 00055 m_pane_window = pane.window; 00056 m_pane_window->Reparent(this); 00057 00058 wxAuiPaneInfo contained_pane = pane; 00059 contained_pane.Dock().Center().Show(). 00060 CaptionVisible(false). 00061 PaneBorder(false). 00062 Layer(0).Row(0).Position(0); 00063 00064 // Carry over the minimum size 00065 SetMinSize(pane.window->GetMinSize()); 00066 00067 m_mgr.AddPane(m_pane_window, contained_pane); 00068 m_mgr.Update(); 00069 00070 if (pane.min_size.IsFullySpecified()) 00071 { 00072 // because SetSizeHints() calls Fit() too (which sets the window 00073 // size to its minimum allowed), we keep the size before calling 00074 // SetSizeHints() and reset it afterwards... 00075 wxSize tmp = GetSize(); 00076 GetSizer()->SetSizeHints(this); 00077 SetSize(tmp); 00078 } 00079 00080 SetTitle(pane.caption); 00081 00082 if (pane.floating_size != wxDefaultSize) 00083 { 00084 SetSize(pane.floating_size); 00085 } 00086 else 00087 { 00088 wxSize size = pane.best_size; 00089 if (size == wxDefaultSize) 00090 size = pane.min_size; 00091 if (size == wxDefaultSize) 00092 size = m_pane_window->GetSize(); 00093 if (pane.HasGripper()) 00094 { 00095 if (pane.HasGripperTop()) 00096 size.y += m_owner_mgr->m_art->GetMetric(wxAUI_ART_GRIPPER_SIZE); 00097 else 00098 size.x += m_owner_mgr->m_art->GetMetric(wxAUI_ART_GRIPPER_SIZE); 00099 } 00100 00101 SetClientSize(size); 00102 } 00103 }
|
|
Definition at line 59 of file floatpane.h. |
|
Definition at line 60 of file floatpane.h. |
|
Definition at line 63 of file floatpane.h. |
|
Definition at line 58 of file floatpane.h. |
|
Definition at line 62 of file floatpane.h. |
|
Definition at line 57 of file floatpane.h. |