wxFRAME_NO_TASKBAR | wxBORDER_NONE | wxFRAME_SHAPED;
62: m_DockContainer(dock_cont),
63m_BtnFrameColor(128, 128, 128),
64m_BtnFillColor(224, 224, 224),
67Create(parent,
wxID_ANY,
wxT(
"Dock Markers Window"),
73SetBackgroundStyle(wxBG_STYLE_CUSTOM);
82SetWindowStyleFlag(GetWindowStyleFlag()&~wxFRAME_FLOAT_ON_PARENT);
87 static boolinitialized =
false;
102 m_Bitmaps[0] = provider->GetBitmap(
wxT(
"wm_dock_center"));
103 m_Bitmaps[1] = provider->GetBitmap(
wxT(
"wm_dock_left"));
104 m_Bitmaps[2] = provider->GetBitmap(
wxT(
"wm_dock_right"));
105 m_Bitmaps[3] = provider->GetBitmap(
wxT(
"wm_dock_top"));
106 m_Bitmaps[4] = provider->GetBitmap(
wxT(
"wm_dock_bottom"));
126 intc_y = rc.y + rc.height / 2;
135 intc_x = rc.x + rc.width / 2;
158wxSize
size= ClientToWindowSize(root_rc.GetSize());
159SetSize(wxRect(root_rc.GetPosition(),
size));
168 #ifdef __WXOSX_COCOA__ 174 #ifdef __WXOSX_COCOA__ 203 boolside_visible = (root_rc.height >= kRootMinSize && root_rc.width >= kRootMinSize);
205 intc_x = root_rc.x + root_rc.width / 2;
206 intc_y = root_rc.y + root_rc.height / 2;
229 if(target_changed) {
232 if(center_visible) {
241 if(root_changed || target_changed) {
244wxSize sz_empty(-1, -1);
253 if(center_visible) {
278 returnroot_changed || target_changed;
284wxPaintDC dc(
this);
287wxPoint
orig= ClientToScreen(wxPoint(0,0));
295 #ifdef __WXOSX_COCOA__ 318 if( ! btn_rc.IsEmpty()) {
321dc.DrawBitmap(
bmp, btn_rc.x, btn_rc.y);
330dc.DrawRectangle(btn_rc);
377EVT_SIZE(CFloatingFrame::OnSize)
392 #if defined(__WXMSW__) 394wxFRAME_FLOAT_ON_PARENT | wxCLIP_CHILDREN ;
395 #elif defined(__WXOSX_COCOA__) 396wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxCLOSE_BOX|
397wxFRAME_NO_TASKBAR | wxFRAME_FLOAT_ON_PARENT ;
399wxRESIZE_BORDER | wxSYSTEM_MENU | wxCAPTION |
wxCLOSE_BOX|
408m_DockManager(&manager),
409m_DockContainer(
NULL)
414Create(parent,
wxID_ANY, wxEmptyString, pos,
size, kFloatFrameStyle);
418 #ifdef __WXOSX_COCOA__ 419m_titlebar_move =
false;
426SystemParametersInfo(38
, 0, &
b, 0);
430 #if defined(__WXOSX_CARBON__) || defined(__WXMAC_CARBON__) 436WindowGroupRef group_class = GetWindowGroupOfClass(kFloatingWindowClass);
437SetWindowGroup((WindowRef)MacGetTopLevelWindowRef(), group_class);
440SetExtraStyle(wxWS_EX_PROCESS_IDLE);
469 returnCFloatingFrameBaseClass::Destroy();
476WXDWORD CFloatingFrame::MSWGetStyle(
long flags, WXDWORD *exstyle )
const 478WXDWORD ms_styles = CFloatingFrameBaseClass::MSWGetStyle(
flags, exstyle);
539 #ifdef __WXOSX_COCOA__ 540 if(event.GetTimestamp() < 0) {
541m_move_start_mouse_pos = ::wxGetMousePosition();
542m_titlebar_move =
true;
580wxRect win_rect = GetRect();
585 #ifdef __WXOSX_COCOA__ 586wxPoint pos = ::wxGetMousePosition();
587wxPoint
delta= pos - m_move_start_mouse_pos;
588win_rect.Offset(
delta);
605 #ifndef __WXOSX_COCOA__ 606constexpr
intkMaxMoveDelta = 30;
658 #ifdef __WXOSX_COCOA__ 659 if(m_titlebar_move ==
true) {
660wxPoint pos = ::wxGetMousePosition();
661 if(pos != m_prev_mouse_pos) {
662m_prev_mouse_pos = pos;
663wxMoveEvent
dummy(pos, wxEVT_MOVING);
670 #ifdef __WXOSX_COCOA__ 671m_titlebar_move =
false;
676wxPoint
offset= ::wxGetMousePosition() - GetPosition();
682 intmax_x = wxSystemSettings::GetMetric(wxSYS_DRAG_X) / 2;
683 intmax_y = wxSystemSettings::GetMetric(wxSYS_DRAG_Y) / 2;
684 booldrop =
abs(delta_x) <= max_x &&
abs(delta_y) <= max_y;
688 event.RequestMore();
716wxPoint sc_mouse_pos = ::wxGetMousePosition();
725 boolactive =
event.GetActive();
731 #if !defined(NCBI_OS_LINUX) && !defined(NCBI_OS_MSWIN) 767 returnwxGetMouseState().LeftIsDown();
CDockContainer is a window that hosts docked windows.
CDockManager & GetDockManager()
CDockManager CDockManager sends requests to Window Manager, Window Manager makes decisions about dele...
void OnFloatingPaneBeginMove(CFloatingFrame &frame, const wxPoint &sc_mouse_pos)
void OnKeyDown(wxKeyEvent &event)
void OnKeyUp(wxKeyEvent &event)
void OnFloatingFrameActivateEvent(CFloatingFrame *frame, bool active)
void OnFrameClosePressed(CFloatingFrame *frame)
void OnFloatingPaneEndMove(CFloatingFrame &frame, CDockManager::EDragResult result, const wxPoint &sc_mouse_pos)
void OnFloatingPaneMoving(CFloatingFrame &frame, const wxPoint &sc_mouse_pos)
CDockMarkerWindow - top level window with docking markers displayed on top of the application window.
void OnPaint(wxPaintEvent &event)
wxRect m_CenterBottomRect
bool x_UpdateLayout(const wxRect &root_rc, const wxRect &target_rc)
virtual EDockEffect HitTest(const wxPoint &screen_pt)
determines whether a given position is inside one of the 9 markers and returns the corresponding dock...
void x_DrawButton(wxDC &dc, const wxRect &btn_rc, int index)
void SetTargetRect(const wxRect &root_rc, const wxRect &target_rc)
CDockManager * m_DockManager
virtual ~CFloatingFrame()
virtual CDockContainer * GetDockContainer()
void OnKeyUp(wxKeyEvent &event)
virtual void SetDockContainer(CDockContainer *dock_cont)
void OnMotion(wxMouseEvent &evt)
void OnIdle(wxIdleEvent &event)
virtual void OnMoveFinished(bool drop)
static bool isMouseDown()
void OnKeyDown(wxKeyEvent &event)
virtual void OnMoveStart()
void OnActivate(wxActivateEvent &event)
void OnClose(wxCloseEvent &event)
CDockContainer * m_DockContainer
void OnMovingEvent(wxMoveEvent &event)
CFloatingFrame(CDockManager &manager, wxWindow *parent, const wxPoint &pos=wxDefaultPosition, const wxSize &size=wxDefaultSize)
CUICommandRegistry is a centralized registry where all application commands should be registered.
static CUICommandRegistry & GetInstance()
the main instance associated with the application
void ApplyAccelerators(wxWindow *frame)
apply accumulated accelerators to the specifed frame
virtual void RegisterFileAlias(const wxArtID &anId, const wxArtClient &aClient, const wxSize &aSize, const wxString &aName, long aType=wxBITMAP_TYPE_ANY, int anIndex=-1)
IMPLEMENT_CLASS(CFloatingFrame, CFloatingFrameBaseClass) const static long kFloatFrameStyle
CFloatingFrame.
static long kMarkersStyle
static int kCenterBtnSize
#define CFloatingFrameBaseClass
CFloatingFrame - a top level floating frame that can host a Dock Container.
thread_local unique_ptr< FtaMsgPost > bmp
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
where boath are integers</td > n< td ></td > n</tr > n< tr > n< td > tse</td > n< td > optional</td > n< td > String</td > n< td class=\"description\"> TSE option controls what blob is orig
const struct ncbi::grid::netcache::search::fields::SIZE size
#define TRUE
bool replacment for C indicating true.
Int4 delta(size_t dimension_, const Int4 *score_)
wxFileArtProvider * GetDefaultFileArtProvider()
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