55 #define WIDGET_PANE_ENTER_TIMER 6310
84 wxEVT_COMMAND_BUTTON_CLICKED,
150 wxWindow* w = wxWindow::FindFocus();
157 while (w !=
NULL && !grab) {
159 if (w->GetName() ==
wxT(
"Sticky Tooltip"))
210 wxTheApp->ProcessIdle();
219 int delay =
static_cast<int>((0.7-
delta)*1000.0);
237 wxPoint pos =
event.GetPosition();
247 bool handled =
false;
252 wxPoint pos =
event.GetPosition();
266 bool handled =
false;
271 wxPoint pos =
event.GetPosition();
313 #ifdef ATTRIB_MENU_SUPPORT
314 if (event.GetEventType() == wxEVT_KEY_DOWN) {
390 , m_pCurrHandlerRec(
NULL)
391 , m_PopupMenuDisplayed(
false)
393 , m_PseudoSized(
false)
395 SetBackgroundColour(wxColour(255, 255, 255));
413 GetClientSize(&w, &h);
414 int vp_y = h - pos.y;
429 int area,
CGlPane* pane,
int index)
433 if(it->m_pHandler ==
handler &&
434 it->m_Area == area &&
448 if (idx++ == index) {
463 if(it->m_pHandler ==
handler) {
509 if((it->m_Area & area)
512 LOG_POST(
Info <<
"x_DispatchEventToHandler " <<
typeid(*handler).name());
533 #ifndef ATTRIB_MENU_SUPPORT
534 if (GetParent() && event.GetEventType() == wxEVT_KEY_DOWN) {
538 if ((event.GetKeyCode() == WXK_NUMPAD_ADD) || (event.GetKeyCode() ==
int(
'='))){
540 GetParent()->GetEventHandler()->ProcessEvent(e);
542 if ((event.GetKeyCode() == WXK_NUMPAD_ADD) || (event.GetKeyCode() ==
int(
'+'))){
544 GetParent()->GetEventHandler()->ProcessEvent(e);
546 else if ((event.GetKeyCode() == WXK_NUMPAD_SUBTRACT) || (event.GetKeyCode() ==
int(
'-'))){
548 GetParent()->GetEventHandler()->ProcessEvent(e);
550 else if ((event.GetKeyCode() == WXK_NUMPAD_MULTIPLY) || (event.GetKeyCode() ==
int(
'8'))){
552 GetParent()->GetEventHandler()->ProcessEvent(e);
564 wxEvtHandler* evt_handler =
handler->GetEvtHandler();
566 bool res = evt_handler->ProcessEvent(event);
639 const wxString& name)
640 : wxPanel(parent,
id, pos,
size, style, name)
666 LOG_POST(
Error <<
"CGlWidgetBase::LoadSettings() - override in derived classes");
672 LOG_POST(
Error <<
"CGlWidgetBase::SaveSettings() - override in derived classes");
684 wxSize
size =
event.GetSize();
685 if (
size.GetWidth() == 0 ||
size.GetHeight() == 0)
695 child_pane->GetClientSize(&w, &h);
697 TVPRect rcVP(0, 0, w - 1, h - 1);
712 if (event.GetOrientation() == wxHORIZONTAL) {
716 else if (event.GetOrientation() == wxVERTICAL) {
725 if (event.GetEventType() == wxEVT_SCROLL_THUMBRELEASE ||
726 event.GetEventType() == wxEVT_SCROLL_TOP ||
727 event.GetEventType() == wxEVT_SCROLL_BOTTOM ||
728 event.GetEventType() == wxEVT_SCROLL_LINEUP ||
729 event.GetEventType() == wxEVT_SCROLL_LINEDOWN ||
730 event.GetEventType() == wxEVT_SCROLL_PAGEUP ||
731 event.GetEventType() == wxEVT_SCROLL_PAGEDOWN) {
883 bool b = wxPanel::DoPopupMenu(menu,x,y);
899 wxFlexGridSizer* sizer =
new wxFlexGridSizer(2, 2, 0, 0);
900 this->SetSizer(sizer);
902 sizer->AddGrowableCol(0);
903 sizer->AddGrowableRow(0);
905 sizer->Add(child_pane, 1, wxEXPAND);
909 wxDefaultSize, wxSB_VERTICAL);
910 sizer->Add(vsb, 0, wxEXPAND);
914 wxDefaultSize, wxSB_HORIZONTAL);
915 sizer->Add(hsb, 0, wxEXPAND);
917 vsb->SetMinSize(wxSize(wxDefaultCoord, 4));
918 hsb->SetMinSize(wxSize(4, wxDefaultCoord));
928 child_pane->Refresh();
980 wxScrollBar* scroll_bar_v = (wxScrollBar*)FindWindow(
ID_VSCROPLLBAR);
981 wxScrollBar* scroll_bar_h = (wxScrollBar*)FindWindow(
ID_HSCROPLLBAR);
997 scroll_bar_h->SetScrollbar(position, thumb_size,
range, page_size);
1000 int range, position, page_size, thumb_size;
1002 if( rc_all.
Height() > 0 ){
1033 scroll_bar_v->SetScrollbar( position, thumb_size,
range, page_size );
1054 child_pane->Refresh();
1069 if( rc_all.
Height() > 0 ){
1090 child_pane->Refresh();
1106 vector<wxEvtHandler*>& handlers = evt.
GetHandlers();
1107 for(
size_t i = 0;
i < handlers.size();
i++ ) {
1108 PushEventHandler(handlers[
i]);
1117 for(
size_t i = 0;
i < handlers.size();
i++ ) {
1118 wxEvtHandler* h = PopEventHandler();
1128 _TRACE(
"unhandled event: CGlWidgetBase:OnViewEvent()");
CEvent - generic event implementation TODO TODO - Attachments.
this class converts model units to the integers distribited in [0, m_IntRange] and vice versa
int RealToInt(double real)
int SizeToInt(double size)
@ eWidgetRangeChanged
notification from child to parent that the visible range has changed
virtual void SetPane(CGlPane *)
GUI command routing and handling framework.
void(*)(CSeq_entry_Handle seh, IWorkbench *wb, const CSerialObject &obj) handler
#define ITERATE(Type, Var, Cont)
ITERATE macro to sequence through container elements.
#define NON_CONST_ITERATE(Type, Var, Cont)
Non constant version of ITERATE macro.
#define LOG_POST(message)
This macro is deprecated and it's strongly recomended to move in all projects (except tests) to macro...
void Error(CExceptionArgs_Base &args)
void Info(CExceptionArgs_Base &args)
TModelUnit GetZoomFactor(void) const
void ZoomPoint(TModelUnit x, TModelUnit y, TModelUnit factor, int options=fZoomXY)
void ZoomInCenter(int options=fZoomXY)
void ZoomOutCenter(int options=fZoomXY)
void SetViewport(const TVPRect &R)
bool IsZoomInAvaiable(void)
void ZoomAll(int options=fZoomXY)
void ZoomRect(const TModelRect &r)
TModelRect & GetModelLimitsRect(void)
void Scroll(TModelUnit dx, TModelUnit dy)
EZoomOptions
EZoomOptions flags control behavior of Zoom operations.
bool IsZoomOutAvaiable(void)
TModelRect & GetVisibleRect(void)
virtual bool Send(CEvent *evt, EDispatch disp_how=eDispatch_Default, int pool_name=ePool_Default)
Sends an event synchronously.
@ eCmdFirstStickyToolTipCmd
@ eCmdLastStickyToolTipCmd
Event fired when an existing tip is removed.
@ eCmdTipRemoved
Event fired when a new tip added.
@ eCmdZoomIn
empty command
@ eEvent_Message
message from one class to another
@ eDispatch_Default
dispatch until handled at least by one handler
#define END_NCBI_SCOPE
End previously defined NCBI scope.
#define BEGIN_NCBI_SCOPE
Define ncbi namespace.
bool IsRunning(void) const
Check state of stopwatch.
double Restart(void)
Return time elapsed since first Start() or last Restart() call (in seconds).
double Elapsed(void) const
Return time elapsed since first Start() or last Restart() call (in seconds).
void Reset(void)
Stop (if running) and reset the timer.
unsigned int
A callback function used to compare two keys in a database.
CMinPanelContainer::OnRestoreWindow EVT_UPDATE_UI_RANGE(eCmdCloseDockPanel, eCmdWindowRestore, CMinPanelContainer::OnUpdateWindowCommand) CMinPanelContainer
range(_Ty, _Ty) -> range< _Ty >
const struct ncbi::grid::netcache::search::fields::SIZE size
Int4 delta(size_t dimension_, const Int4 *score_)
wxEVT_COMMAND_MENU_SELECTED
ViewerWindowBase::OnEditMenu ViewerWindowBase::OnJustification EVT_MENU(MID_SHOW_GEOM_VLTNS, ViewerWindowBase::OnShowGeomVltns) EVT_MENU(MID_FIND_PATTERN
void SetFocus(CRef< objects::CSeq_entry > entry)
bool DlgGLWinOverlayFix(wxWindow *win)
Fix a problem on windows where after a dialog overlays an opengl window the opengl window may be cons...
void CleanupSeparators(wxMenu &menu)
Removes extra separators (in the begining or at the end of the menu, ot those that precede other sepa...