diff options
author | Caolán McNamara <caolanm@redhat.com> | 2015-04-27 11:18:39 +0100 |
---|---|---|
committer | Caolán McNamara <caolanm@redhat.com> | 2015-04-27 12:50:30 +0100 |
commit | 12288cec079d004ce491043aca6ba57bf13f73af (patch) | |
tree | ee44af1519f60d49bdc25adf162b2c3726b6a65f /vcl/unx | |
parent | 950055bcb06c8edcd9062c71184f02bf8e0604e6 (diff) |
I can't read this horror, expand
Change-Id: Ibb99040b612df2aad638e574667555d0302b46c4
Diffstat (limited to 'vcl/unx')
-rw-r--r-- | vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx | 119 |
1 files changed, 94 insertions, 25 deletions
diff --git a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx index 9d82368f6153..abab9e131e13 100644 --- a/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx +++ b/vcl/unx/gtk3/gdi/gtk3salnativewidgets-gtk.cxx @@ -1437,32 +1437,101 @@ void GtkSalGraphics::updateSettings( AllSettings& rSettings ) bool GtkSalGraphics::IsNativeControlSupported( ControlType nType, ControlPart nPart ) { - if( - (nType == CTRL_EDITBOX) || - (nType == CTRL_PUSHBUTTON && nPart == PART_ENTIRE_CONTROL) || - (nType == CTRL_CHECKBOX && nPart == PART_ENTIRE_CONTROL) || - (nType == CTRL_RADIOBUTTON && nPart == PART_ENTIRE_CONTROL) || - (nType == CTRL_TOOLBAR && - (nPart == PART_BUTTON || nPart == PART_ENTIRE_CONTROL)) || - ((nType == CTRL_SPINBOX) && - ((nPart == PART_ENTIRE_CONTROL) || (nPart == PART_ALL_BUTTONS) || - (nPart == HAS_BACKGROUND_TEXTURE))) || - ((nType == CTRL_COMBOBOX) && - ((nPart == PART_ENTIRE_CONTROL) || (nPart == PART_ALL_BUTTONS) || - (nPart == HAS_BACKGROUND_TEXTURE))) || - ((nType==CTRL_LISTBOX) && - ((nPart==PART_ENTIRE_CONTROL) || (nPart == PART_WINDOW) || (nPart == PART_BUTTON_DOWN) || - (nPart==HAS_BACKGROUND_TEXTURE))) || - ((nType == CTRL_SCROLLBAR) && - ( (nPart == PART_DRAW_BACKGROUND_HORZ) || (nPart == PART_DRAW_BACKGROUND_VERT) || - (nPart == PART_ENTIRE_CONTROL) || (nPart == HAS_THREE_BUTTONS))) || - (nType == CTRL_MENU_POPUP && - ( (nPart == PART_ENTIRE_CONTROL) || (nPart == PART_MENU_ITEM) || - (nPart == PART_MENU_ITEM_CHECK_MARK) || (nPart == PART_MENU_ITEM_RADIO_MARK) || - (nPart == PART_MENU_SEPARATOR) || (nPart == PART_MENU_SUBMENU_ARROW) )) - ) + switch(nType) { - return true; + case CTRL_PUSHBUTTON: + case CTRL_RADIOBUTTON: + case CTRL_CHECKBOX: +// case CTRL_TOOLTIP: +// case CTRL_PROGRESS: +// case CTRL_LISTNODE: +// case CTRL_LISTNET: + if(nPart==PART_ENTIRE_CONTROL) + return true; + break; + + case CTRL_SCROLLBAR: + if(nPart==PART_DRAW_BACKGROUND_HORZ || nPart==PART_DRAW_BACKGROUND_VERT || + nPart==PART_ENTIRE_CONTROL || nPart==HAS_THREE_BUTTONS) + return true; + break; + + case CTRL_EDITBOX: +// case CTRL_MULTILINE_EDITBOX: + case CTRL_COMBOBOX: + if(nPart==PART_ENTIRE_CONTROL || nPart==HAS_BACKGROUND_TEXTURE || nPart == PART_ALL_BUTTONS) + return true; + break; + + case CTRL_SPINBOX: + if(nPart==PART_ENTIRE_CONTROL || nPart==PART_ALL_BUTTONS || nPart==HAS_BACKGROUND_TEXTURE) + return true; + break; + +// case CTRL_SPINBUTTONS: +// if(nPart==PART_ENTIRE_CONTROL || nPart==PART_ALL_BUTTONS) +// return true; +// break; + +// case CTRL_FRAME: +// case CTRL_WINDOW_BACKGROUND: +// return true; + +// case CTRL_TAB_ITEM: +// case CTRL_TAB_PANE: +// case CTRL_TAB_BODY: +// if(nPart==PART_ENTIRE_CONTROL || nPart==PART_TABS_DRAW_RTL) +// return true; +// break; + + case CTRL_LISTBOX: + if(nPart==PART_ENTIRE_CONTROL || nPart==PART_WINDOW || nPart==HAS_BACKGROUND_TEXTURE || nPart == PART_BUTTON_DOWN) + return true; + break; + + case CTRL_TOOLBAR: + if( nPart==PART_ENTIRE_CONTROL +// || nPart==PART_DRAW_BACKGROUND_HORZ +// || nPart==PART_DRAW_BACKGROUND_VERT +// || nPart==PART_THUMB_HORZ +// || nPart==PART_THUMB_VERT + || nPart==PART_BUTTON +// || nPart==PART_SEPARATOR_HORZ +// || nPart==PART_SEPARATOR_VERT + ) + return true; + break; + +// case CTRL_MENUBAR: +// if(nPart==PART_ENTIRE_CONTROL || nPart==PART_MENU_ITEM) +// return true; +// break; + + case CTRL_MENU_POPUP: + if (nPart==PART_ENTIRE_CONTROL + || nPart==PART_MENU_ITEM + || nPart==PART_MENU_ITEM_CHECK_MARK + || nPart==PART_MENU_ITEM_RADIO_MARK + || nPart==PART_MENU_SEPARATOR + || nPart==PART_MENU_SUBMENU_ARROW + ) + return true; + break; + +// case CTRL_SLIDER: +// if(nPart == PART_TRACK_HORZ_AREA || nPart == PART_TRACK_VERT_AREA) +// return true; +// break; + +// case CTRL_FIXEDLINE: +// if(nPart == PART_SEPARATOR_VERT || nPart == PART_SEPARATOR_HORZ) +// return true; +// break; + +// case CTRL_LISTHEADER: +// if(nPart == PART_BUTTON || nPart == PART_ARROW) +// return true; +// break; } printf( "Unhandled is native supported for Type: %d, Part %d\n", |