MCPcopy Create free account
hub / github.com/cmauri/eviacam / OnTimer

Method OnTimer

wxutil/wxappbar.cpp:1033–1086  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1031}
1032
1033void WXAppBar::OnTimer(wxTimerEvent& event)
1034{
1035#if defined(__WXGTK__)
1036 int x, y;
1037
1038 m_pMouseControl->GetPointerLocation (x, y);
1039 wxRect barRect = GetRect();
1040
1041 if (m_autohide && m_currentDockingMode != NON_DOCKED && m_isAutohideWindowShown && !barRect.Contains(x,y))
1042 {
1043 // Get X11 display
1044 Display* dd= (Display *) wxGetDisplay(); assert (dd);
1045
1046 // Get desktop working area dimensions
1047 int xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight;
1048 GetDesktopDimensions (dd, xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight);
1049
1050 // Get original dimensions of the bar
1051 wxSize proposedSize= GetBestSize();
1052
1053 // Compute bar position and size depending on docking mode
1054 m_Width= proposedSize.GetWidth();
1055 m_Height= proposedSize.GetHeight();
1056
1057 switch (m_currentDockingMode) {
1058 case TOP_DOCKED:
1059 m_X= (screenWidth - proposedSize.GetWidth())/2;
1060 m_Y= 0 - proposedSize.GetHeight() + AUTOHIDE_FLANGE;
1061 break;
1062 case BOTTOM_DOCKED:
1063 m_X= (screenWidth - proposedSize.GetWidth())/2;
1064 m_Y= screenHeight - AUTOHIDE_FLANGE;
1065 break;
1066 case LEFT_DOCKED:
1067 m_X= 0 - proposedSize.GetWidth() + AUTOHIDE_FLANGE;
1068 m_Y= (screenHeight - proposedSize.GetHeight())/2;
1069 break;
1070 case RIGHT_DOCKED:
1071 m_X= screenWidth - AUTOHIDE_FLANGE;
1072 m_Y= (screenHeight - proposedSize.GetHeight())/2;
1073 break;
1074 case NON_DOCKED:
1075 default:
1076 assert (false);
1077 }
1078
1079 // Set desired location and dimensions
1080 SetSize(m_X, m_Y, m_Width, m_Height);
1081
1082 m_isAutohideWindowShown= false;
1083 }
1084#endif
1085 event.Skip(false);
1086}
1087
1088void WXAppBar::SetWarnBarOverlap(bool value)
1089{

Callers

nothing calls this directly

Calls 2

GetDesktopDimensionsFunction · 0.85
GetPointerLocationMethod · 0.80

Tested by

no test coverage detected