| 782 | } |
| 783 | |
| 784 | void WXAppBar::SetAutohideModeStep () |
| 785 | { |
| 786 | //CheckCreateWindow(); |
| 787 | |
| 788 | // |
| 789 | // Get X11 display |
| 790 | // |
| 791 | Display* dd= (Display *) wxGetDisplay(); assert (dd); |
| 792 | |
| 793 | // |
| 794 | // Get desktop working area dimensions |
| 795 | // |
| 796 | int xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight; |
| 797 | GetDesktopDimensions (dd, xDesktop, yDesktop, widthDesktop, heightDesktop, screenWidth, screenHeight); |
| 798 | |
| 799 | // |
| 800 | // As we need to dock the window disable decorations |
| 801 | // |
| 802 | m_dialogHadBorderDecorations= GetBorderDecorations(); |
| 803 | SetBorderDecorations(false); |
| 804 | |
| 805 | // |
| 806 | // Get X11 handle for our window |
| 807 | // |
| 808 | GtkWidget *gtkWidget= (GtkWidget *) this->GetHandle(); |
| 809 | Window w= GDK_WINDOW_XID (gtk_widget_get_window (gtkWidget)); |
| 810 | |
| 811 | // Get original dimensions of the bar |
| 812 | wxSize proposedSize= GetBestSize(); |
| 813 | |
| 814 | // Compute bar position and size depending on docking mode |
| 815 | m_Width= proposedSize.GetWidth(); |
| 816 | m_Height= proposedSize.GetHeight(); |
| 817 | |
| 818 | switch (m_currentDockingMode) { |
| 819 | case TOP_DOCKED: |
| 820 | m_X= (screenWidth - proposedSize.GetWidth())/2; |
| 821 | m_Y= 0 - proposedSize.GetHeight() + AUTOHIDE_FLANGE; |
| 822 | break; |
| 823 | case BOTTOM_DOCKED: |
| 824 | m_X= (screenWidth - proposedSize.GetWidth())/2; |
| 825 | m_Y= screenHeight - AUTOHIDE_FLANGE; |
| 826 | break; |
| 827 | case LEFT_DOCKED: |
| 828 | m_X= 0 - proposedSize.GetWidth() + AUTOHIDE_FLANGE; |
| 829 | m_Y= (screenHeight - proposedSize.GetHeight())/2; |
| 830 | break; |
| 831 | case RIGHT_DOCKED: |
| 832 | m_X= screenWidth - AUTOHIDE_FLANGE; |
| 833 | m_Y= (screenHeight - proposedSize.GetHeight())/2; |
| 834 | break; |
| 835 | case NON_DOCKED: |
| 836 | default: |
| 837 | assert (false); |
| 838 | } |
| 839 | |
| 840 | |
| 841 | // |
nothing calls this directly
no test coverage detected