wxAUI_NB_TAB_EXTERNAL_MOVE |
70wxAUI_NB_SCROLL_BUTTONS |
71wxAUI_NB_WINDOWLIST_BUTTON |
72wxAUI_NB_CLOSE_ON_ACTIVE_TAB |
82, m_DockContainer( &container )
83, m_OutsideDrag(
false)
86SetLabel(
wxT(
"dock_notebook") );
89wxAuiDockArt* dock_art = m_mgr.GetArtProvider();
90dock_art->SetMetric( wxAUI_DOCKART_PANE_BORDER_SIZE, 0 );
117 size_tindex = GetPageIndex(child);
118 intselpage = GetSelection();
125 if(selpage != wxNOT_FOUND &&
126selpage >= (
int)GetPageCount() &&
128SetSelection(selpage-1);
136 size_tindex = GetPageIndex(old_child);
141 intother_index = (index == 0) ? 1 : 0;
142SetSelection(other_index);
145InsertPage(index, new_child,
ToWxString(
label),
false, wxNullBitmap);
146new_child->Reparent(
this);
152 intpage_ix = GetPageIndex( page );
153 if( page_ix == wxNOT_FOUND ){
158wxString old_label = GetPageText( page_ix );
159 if(
label== old_label ){
163SetPageText( page_ix,
label);
175 switch(viewOption) {
202SetSelection(other_index);
204InsertPage(
m_HitTabIndex, page, caption,
false, wxNullBitmap);
206AddPage(page, caption);
213 if(GetPageCount() == 0) {
219wxPoint client_pt = ScreenToClient(screen_pt);
220wxAuiTabCtrl* tabs = GetTabCtrlFromPoint(client_pt);
221wxWindow* over_tab =
NULL;
223 if(tabs && tabs->TabHitTest(client_pt.x, client_pt.y, &over_tab)) {
232wxRect rc = GetClientRect();
234 if(rc.Contains(client_pt)) {
249 intindex =
event.GetSelection();
250wxWindow* page = GetPage(index);
265 intsel = GetSelection();
267wxWindow* page = GetPage(sel);
269vector<IWMClient*> clients;
272 if(clients.size()) {
281 if(event.GetSelection() == event.GetOldSelection())
289 intsel =
event.GetOldSelection();
291wxWindow* page = GetPage(sel);
299sel =
event.GetSelection();
301wxWindow* page = GetPage(sel);
303 #ifdef __WXOSX_COCOA__ 304vector<IWMClient*> clients;
307 if(clients.size()) {
310cl_w->SendSizeEvent();
330 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9) 352wxPoint screen_pt = ::wxGetMousePosition();
353wxPoint client_pt = ScreenToClient(screen_pt);
356wxAuiTabCtrl* src_tabs = (wxAuiTabCtrl*)evt.GetEventObject();
357wxAuiTabCtrl* dest_tabs = GetTabCtrlFromPoint(client_pt);
359 if(dest_tabs == src_tabs)
362src_tabs->SetCursor(wxCursor(wxCURSOR_ARROW));
368wxPoint pt = dest_tabs->ScreenToClient(screen_pt);
369wxWindow* dest_location_tab;
372 if(dest_tabs->TabHitTest(pt.x, pt.y, &dest_location_tab)) {
373 intsrc_idx = evt.GetSelection();
374 intdest_idx = dest_tabs->GetIdxFromWindow(dest_location_tab);
377 if((src_idx == dest_idx) || dest_idx == -1 ||
378#
if(wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9)
379(src_idx > dest_idx && m_last_drag_x <= pt.x) ||
380(src_idx < dest_idx && m_last_drag_x >= pt.x)) {
381m_last_drag_x = pt.x;
383(src_idx > dest_idx && m_lastDragX <= pt.x) ||
384(src_idx < dest_idx && m_lastDragX >= pt.x)) {
390wxWindow* src_tab = dest_tabs->GetWindowFromIdx(src_idx);
392dest_tabs->MovePage(src_tab, dest_idx);
393dest_tabs->SetActivePage((
size_t)dest_idx);
394dest_tabs->DoShowHide();
395dest_tabs->Refresh();
396 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9) 397m_last_drag_x = pt.x;
415 intindex = evt.GetSelection();
421wxAuiTabCtrl* ctrl =
dynamic_cast<wxAuiTabCtrl*
>(evt.GetEventObject());
422 if(GetCapture() == ctrl) {
423ctrl->ReleaseMouse();
439 intsel_ix = GetSelection();
440 if( sel_ix < 0 ){
return; }
442wxWindow* sel_page = GetPage( sel_ix );
443 if( sel_page ==
NULL){
return; }
445wxAuiTabCtrl* tab_ctrl;
448 if( FindTab( sel_page, &tab_ctrl, &tab_ix ) ){
450 #if defined(__WXMSW__) 451tab_ctrl->HandlePaint();
454tab_ctrl->MakeTabVisible( tab_ix, tab_ctrl );
476 #if (wxMAJOR_VERSION == 2 && wxMINOR_VERSION < 9) 477dc.SetBrush(m_bkbrush);
479dc.SetBrush(m_bkBrush);
481dc.SetPen(*wxTRANSPARENT_PEN);
482dc.DrawRectangle(-1, -1, rect.GetWidth()+2, rect.GetHeight()+2);
485dc.SetPen(*wxGREY_PEN);
486dc.DrawLine(0, rect.GetHeight()-1, rect.GetWidth(), rect.GetHeight()-1);
517wxColour cl_back = wxSystemSettings::GetColour(wxSYS_COLOUR_BTNFACE);
518wxBrush brush(cl_back);
520dc.SetPen(*wxTRANSPARENT_PEN);
522dc.DrawRectangle(x, y, w, h);
524 #ifdef __WXMAC__THIS_CODE_NEEDS_TO_BE_CHANGED_EVERYTIME_OSX_UPGRADED 527HIRect rect = CGRectMake(x, y, w, h);
529HIThemeSplitterDrawInfo
info;
530 info.state = kThemeStateActive;
531 info.adornment = kThemeAdornmentNone;
533WindowRef wr = WindowRef(this->MacGetTopLevelWindowRef());
535QDBeginCGContext (GetWindowPort(wr), &
context);
536HIThemeDrawPaneSplitter(&rect, &
info,
context, kHIThemeOrientationInverted);
537QDEndCGContext(GetWindowPort(wr), &
context);
549 intcol = -1,
row= -1;
CDockContainer is a window that hosts docked windows.
void OnTabClosePressed(wxWindow *page)
void OnUpdateTabOrder(CDockNotebook ¬ebook)
void GetClientsInWindow(wxWindow *window, vector< IWMClient * > &clients)
CDockNotebookTabArt - a customized version of wxAuiSimpleTabArt that renders background differently.
virtual wxAuiTabArt * Clone()
virtual void DrawBackground(wxDC &dc, wxWindow *wnd, const wxRect &rect)
CDockNotebookTabArt()
CDockNotebookTabArt.
CDockNotebook - an extended version of wxAuiNotebook capable of working with Dock Manager and Window ...
void OnTabEndDrag(wxAuiNotebookEvent &event)
virtual void Cont_Remove(wxWindow *child)
void OnTabBeginDrag(wxAuiNotebookEvent &event)
CDockNotebook(CDockContainer &container)
void RefreshPageByWindow(wxWindow *page)
CDockContainer * m_DockContainer
void InsertPageAtHitPoint(wxWindow *page, const wxString &caption)
string x_GetPageNameByWindow(wxWindow *window)
virtual void Cont_Replace(wxWindow *old_child, wxWindow *new_child)
virtual void SetDockContainer(CDockContainer *cont)
virtual EDockEffect DropTest(const wxPoint &screen_pt, wxWindow *&target)
void OnTabDragMotion(wxAuiNotebookEvent &event)
void OnPageClose(wxAuiNotebookEvent &event)
void OnPageChanging(wxAuiNotebookEvent &event)
void MakeSelectionVisible()
virtual CDockContainer * GetDockContainer()
void OnPageChanged(wxAuiNotebookEvent &event)
CDockPanel - a container with a title bar (caption) hosting a single client window (IWMClient).
CDockSplitter = an extended version of CSplitter capable of working with Dock Manager and Window Mana...
CDockContainer * m_DockContainer
virtual void Cont_Remove(wxWindow *child)
virtual void SetDockContainer(CDockContainer *cont)
virtual void x_DrawSeparator(wxDC &dc, int x, int y, int w, int h)
virtual CDockContainer * GetDockContainer()
virtual void Cont_Replace(wxWindow *old_child, wxWindow *new_child)
CDockSplitter(CDockContainer &container, CSplitter::ESplitType type)
CDockSplitter.
static CGuiRegistry & GetInstance()
access the application-wide singleton
int GetInt(const string &key, int default_val=0) const
retrieve values by section and key.
CSplitter - container with resizable separators.
bool FindChild(const wxWindow *child, int &col, int &row) const
bool InsertToCell(wxWindow *child, int col, int row)
If cell [col, row] exists and vacant - adds widget to the container.
ESplitType
ESplitMode - splitter orientation.
IDockableWindow - repersents a window that can be docked in Dock Manager.
IWClient - abstract Window Manager client.
virtual wxWindow * GetWindow()=0
returns a pointer to the wxWindow representing the client
ELabel
Different flavors of label types for different GUI aspects.
@ eDetailed
Detailed name.
@ eContent
Short name with content.
@ eTypeAndContent
Short name with content and type.
virtual string GetClientLabel(IWMClient::ELabel ltype=IWMClient::eDefault) const =0
returns the client label (name) to be displayed in UI
const int kNotebookStyle
CDockNotebook.
@ eCmdParentHide
tool tip parent window shown
@ eCmdParentShow
tool tip parent window activated
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
static const char label[]
static SLJIT_INLINE sljit_ins l(sljit_gpr r, sljit_s32 d, sljit_gpr x, sljit_gpr b)
#define row(bind, expected)
static CS_CONTEXT * context
wxString ToWxString(const string &s)
void BroadcastCommandToChildWindows(wxWindow *window, int cmd_id, int cmd_data=0)
Sends command event with id 'cmd_id' to window and all its children.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4