salnativewidgets.cxx (9f62ea84) salnativewidgets.cxx (3460f9c8)
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 802 unchanged lines hidden (view full) ---

811 HIThemeDrawTrack( &aTrackDraw, NULL, mrContext, kHIThemeOrientationNormal );
812 bOK = true;
813 }
814 }
815 break;
816
817 case CTRL_SCROLLBAR:
818 {
1/**************************************************************
2 *
3 * Licensed to the Apache Software Foundation (ASF) under one
4 * or more contributor license agreements. See the NOTICE file
5 * distributed with this work for additional information
6 * regarding copyright ownership. The ASF licenses this file
7 * to you under the Apache License, Version 2.0 (the
8 * "License"); you may not use this file except in compliance

--- 802 unchanged lines hidden (view full) ---

811 HIThemeDrawTrack( &aTrackDraw, NULL, mrContext, kHIThemeOrientationNormal );
812 bOK = true;
813 }
814 }
815 break;
816
817 case CTRL_SCROLLBAR:
818 {
819 ScrollbarValue* pScrollbarVal = (ScrollbarValue *)&aValue;
819 const ScrollbarValue* pScrollbarVal = (aValue.getType() == CTRL_SCROLLBAR) ? static_cast<const ScrollbarValue*>(&aValue) : NULL;
820
821 if( nPart == PART_DRAW_BACKGROUND_VERT ||
822 nPart == PART_DRAW_BACKGROUND_HORZ )
823 {
824 HIThemeTrackDrawInfo aTrackDraw;
825 aTrackDraw.kind = kThemeMediumScrollBar;
826 // FIXME: the scrollbar length must be adjusted
827 if (nPart == PART_DRAW_BACKGROUND_VERT)

--- 252 unchanged lines hidden (view full) ---

1080 CGContextFillRect (mrContext, CGRectMake(rc.origin.x, rc.origin.y, rc.size.width, rc.size.height));
1081 //fill a white background, because drawFrame only draws the border
1082
1083 HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
1084
1085 if(nState & CTRL_STATE_FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
1086
1087 //buttons:
820
821 if( nPart == PART_DRAW_BACKGROUND_VERT ||
822 nPart == PART_DRAW_BACKGROUND_HORZ )
823 {
824 HIThemeTrackDrawInfo aTrackDraw;
825 aTrackDraw.kind = kThemeMediumScrollBar;
826 // FIXME: the scrollbar length must be adjusted
827 if (nPart == PART_DRAW_BACKGROUND_VERT)

--- 252 unchanged lines hidden (view full) ---

1080 CGContextFillRect (mrContext, CGRectMake(rc.origin.x, rc.origin.y, rc.size.width, rc.size.height));
1081 //fill a white background, because drawFrame only draws the border
1082
1083 HIThemeDrawFrame(&rc, &aTextDrawInfo, mrContext, kHIThemeOrientationNormal);
1084
1085 if(nState & CTRL_STATE_FOCUSED) HIThemeDrawFocusRect(&rc, true, mrContext, kHIThemeOrientationNormal);
1086
1087 //buttons:
1088 SpinbuttonValue* pSpinButtonVal = (SpinbuttonValue *)&aValue;
1088 const SpinbuttonValue* pSpinButtonVal = (aValue.getType() == CTRL_SPINBUTTONS) ? static_cast<const SpinbuttonValue*>(&aValue) : NULL;
1089 ControlState nUpperState = CTRL_STATE_ENABLED;//state of the upper button
1090 ControlState nLowerState = CTRL_STATE_ENABLED;//and of the lower button
1091 if(pSpinButtonVal) {//pSpinButtonVal is sometimes null
1092 nUpperState = (ControlState) pSpinButtonVal->mnUpperState;
1093 nLowerState = (ControlState) pSpinButtonVal->mnLowerState;
1089 ControlState nUpperState = CTRL_STATE_ENABLED;//state of the upper button
1090 ControlState nLowerState = CTRL_STATE_ENABLED;//and of the lower button
1091 if(pSpinButtonVal) {//pSpinButtonVal is sometimes null
1092 nUpperState = (ControlState) pSpinButtonVal->mnUpperState;
1093 nLowerState = (ControlState) pSpinButtonVal->mnLowerState;
1094 }
1095
1094
1096 if( pSpinButtonVal )
1097 {
1098 HIThemeButtonDrawInfo aSpinInfo;
1099 aSpinInfo.kind = kThemeIncDecButton;
1100 aSpinInfo.state = kThemeStateActive;
1101 if(nUpperState & CTRL_STATE_PRESSED)
1102 aSpinInfo.state = kThemeStatePressedUp;
1103 else if(nLowerState & CTRL_STATE_PRESSED)
1104 aSpinInfo.state = kThemeStatePressedDown;
1105 else if((nUpperState & ~CTRL_STATE_ENABLED)||(nLowerState & ~CTRL_STATE_ENABLED))

--- 420 unchanged lines hidden ---
1095 HIThemeButtonDrawInfo aSpinInfo;
1096 aSpinInfo.kind = kThemeIncDecButton;
1097 aSpinInfo.state = kThemeStateActive;
1098 if(nUpperState & CTRL_STATE_PRESSED)
1099 aSpinInfo.state = kThemeStatePressedUp;
1100 else if(nLowerState & CTRL_STATE_PRESSED)
1101 aSpinInfo.state = kThemeStatePressedDown;
1102 else if((nUpperState & ~CTRL_STATE_ENABLED)||(nLowerState & ~CTRL_STATE_ENABLED))

--- 420 unchanged lines hidden ---