Kaydet (Commit) e97e62a4 authored tarafından Miklos Vajna's avatar Miklos Vajna

convert drawinglayer gradient dialog to new .ui

Change-Id: Iaa91d3b1ab47e02edc69c2b9abdb33ae097571cb
üst 0d47e4c4
......@@ -14,6 +14,7 @@ $(eval $(call gb_UI_add_uifiles,cui,\
cui/uiconfig/ui/borderpage \
cui/uiconfig/ui/charnamepage \
cui/uiconfig/ui/colorpage \
cui/uiconfig/ui/gradientpage \
cui/uiconfig/ui/colorconfigwin \
cui/uiconfig/ui/effectspage \
cui/uiconfig/ui/hyphenate \
......
......@@ -370,30 +370,26 @@ class SvxGradientTabPage : public SfxTabPage
using TabPage::DeactivatePage;
private:
FixedLine aFlProp;
FixedText aFtType;
ListBox aLbGradientType;
FixedText aFtCenterX;
MetricField aMtrCenterX;
FixedText aFtCenterY;
MetricField aMtrCenterY;
FixedText aFtAngle;
MetricField aMtrAngle;
FixedText aFtBorder;
MetricField aMtrBorder;
FixedText aFtColorFrom;
ColorLB aLbColorFrom;
MetricField aMtrColorFrom;
FixedText aFtColorTo;
ColorLB aLbColorTo;
MetricField aMtrColorTo;
GradientLB aLbGradients;
SvxXRectPreview aCtlPreview;
PushButton aBtnAdd;
PushButton aBtnModify;
PushButton aBtnDelete;
ImageButton aBtnLoad;
ImageButton aBtnSave;
ListBox* m_pLbGradientType;
FixedText* m_pFtCenterX;
MetricField* m_pMtrCenterX;
FixedText* m_pFtCenterY;
MetricField* m_pMtrCenterY;
FixedText* m_pFtAngle;
MetricField* m_pMtrAngle;
FixedText* m_pFtAngleDegrees;
MetricField* m_pMtrBorder;
ColorLB* m_pLbColorFrom;
MetricField* m_pMtrColorFrom;
ColorLB* m_pLbColorTo;
MetricField* m_pMtrColorTo;
GradientLB* m_pLbGradients;
SvxXRectPreview* m_pCtlPreview;
PushButton* m_pBtnAdd;
PushButton* m_pBtnModify;
PushButton* m_pBtnDelete;
PushButton* m_pBtnLoad;
PushButton* m_pBtnSave;
const SfxItemSet& rOutAttrs;
......
......@@ -55,22 +55,6 @@
#define LB_HATCHINGS 4
#define LB_LINE_TYPE 1
#define LB_LINE_COLOR 3
#define LB_GRADIENTS 3
#define LB_GRADIENT_TYPES 4
#define LB_COLOR_FROM 1
#define LB_COLOR_TO 2
#define FT_COLOR_FROM 1
#define FT_COLOR_TO 2
#define FT_CENTER_X 3
#define FT_CENTER_Y 5
#define FT_ANGLE 4
#define FT_BORDER 6
#define MTR_COLOR_FROM 4
#define MTR_COLOR_TO 5
#define MTR_CENTER_X 2
#define MTR_CENTER_Y 3
#define MTR_BORDER 6
#define MTR_ANGLE 1
#define NUM_FLD_STEPCOUNT 1
#define FT_PIXEL_EDIT 4
#define CTL_PIXEL 2
......
......@@ -1001,271 +1001,6 @@ TabPage RID_SVXPAGE_BITMAP
};
};
// ------------------------------------------------------
TabPage RID_SVXPAGE_GRADIENT
{
HelpID = HID_AREA_GRADIENT ;
Hide = TRUE ;
Text [ en-US ] = "Gradients" ;
Size = MAP_APPFONT ( TP_WIDTH , TP_HEIGHT ) ;
FixedLine FL_PROP
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 248, 8 ) ;
Text [ en-US ] = "Properties";
};
FixedText FT_TYPE
{
Pos = MAP_APPFONT ( 12 , 16 ) ;
Size = MAP_APPFONT ( 26 , 8 ) ;
Text [ en-US ] = "Ty~pe" ;
};
ListBox LB_GRADIENT_TYPES
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENT_TYPES";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 14 ) ;
Size = MAP_APPFONT ( 48, 63 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
StringList [ en-US ] =
{
< "Linear" ; Default ; > ;
< "Axial" ; Default ; > ;
< "Radial" ; Default ; > ;
< "Ellipsoid" ; Default ; > ;
< "Square" ; Default ; > ;
< "Rectangular" ; Default ; > ;
};
};
FixedText FT_CENTER_X
{
Pos = MAP_APPFONT ( 12 , 32 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Center ~X" ;
};
MetricField MTR_CENTER_X
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_X";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 30 ) ;
Size = MAP_APPFONT ( 40 , 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_CENTER_Y
{
Pos = MAP_APPFONT ( 12 , 48 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "Center ~Y" ;
};
MetricField MTR_CENTER_Y
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_CENTER_Y";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 46 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_ANGLE
{
Pos = MAP_APPFONT ( 12 , 64 ) ;
Size = MAP_APPFONT ( 37 , 8 ) ;
Text [ en-US ] = "A~ngle" ;
};
MetricField MTR_ANGLE
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_ANGLE";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 62 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 359 ;
Unit = FUNIT_CUSTOM ;
CustomUnitText [ en-US ] = " degrees" ;
Last = 359 ;
SpinSize = 15 ;
};
FixedText FT_BORDER
{
Pos = MAP_APPFONT ( 12 , 80 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~Border" ;
};
MetricField MTR_BORDER
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_BORDER";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 78 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_COLOR_FROM
{
Pos = MAP_APPFONT ( 12 , 99 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~From" ;
};
ListBox LB_COLOR_FROM
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 97 ) ;
Size = MAP_APPFONT ( 48, 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
};
MetricField MTR_COLOR_FROM
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_FROM";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 113 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
FixedText FT_COLOR_TO
{
Pos = MAP_APPFONT ( 12 , 133 ) ;
Size = MAP_APPFONT ( 32 , 8 ) ;
Text [ en-US ] = "~To" ;
};
ListBox LB_COLOR_TO
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_COLOR_TO";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 131 ) ;
Size = MAP_APPFONT ( 48, 100 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
DDExtraWidth = TRUE ;
};
MetricField MTR_COLOR_TO
{
HelpID = "cui:MetricField:RID_SVXPAGE_GRADIENT:MTR_COLOR_TO";
Border = TRUE ;
Pos = MAP_APPFONT ( 49 , 147 ) ;
Size = MAP_APPFONT ( 40, 12 ) ;
TabStop = TRUE ;
Repeat = TRUE ;
Spin = TRUE ;
Maximum = 100 ;
StrictFormat = TRUE ;
Unit = FUNIT_CUSTOM ;
CustomUnitText = "%" ;
Last = 100 ;
SpinSize = 5 ;
};
ListBox LB_GRADIENTS
{
HelpID = "cui:ListBox:RID_SVXPAGE_GRADIENT:LB_GRADIENTS";
Border = TRUE ;
Pos = MAP_APPFONT ( 103 , 14 ) ;
Size = MAP_APPFONT ( 88 , 110 ) ;
TabStop = TRUE ;
};
Control CTL_PREVIEW
{
Border = TRUE;
Pos = MAP_APPFONT ( 103 , 131 ) ;
Size = MAP_APPFONT ( 88 , 42 ) ;
};
PushButton BTN_ADD
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_ADD";
Pos = MAP_APPFONT ( 197 , 14 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Add..." ;
TabStop = TRUE ;
};
PushButton BTN_MODIFY
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_MODIFY";
Pos = MAP_APPFONT ( 197 , 32 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Modify..." ;
TabStop = TRUE ;
};
PushButton BTN_DELETE
{
HelpID = "cui:PushButton:RID_SVXPAGE_GRADIENT:BTN_DELETE";
Pos = MAP_APPFONT ( 197 , 68 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete..." ;
TabStop = TRUE ;
};
ImageButton BTN_LOAD
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_LOAD";
Pos = MAP_APPFONT ( 197 , 104 ) ;
Size = MAP_APPFONT ( 16 , 16 ) ;
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Load Gradients List";
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "sc05501.bmp" ;
};
};
};
ImageButton BTN_SAVE
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_SAVE";
Pos = MAP_APPFONT ( 217 , 104 ) ;
Size = MAP_APPFONT ( 16 , 16 ) ;
TabStop = TRUE ;
QuickHelpText [ en-US ] = "Save Gradients List";
ButtonImage = Image
{
ImageBitmap = Bitmap
{
File = "sc05502.bmp" ;
};
};
};
CheckBox BTN_EMBED
{
HelpID = "cui:ImageButton:RID_SVXPAGE_GRADIENT:BTN_EMBED";
Pos = MAP_APPFONT ( 197 , 124 ) ;
Size = MAP_APPFONT ( 122 , 10 ) ;
Text [ en-US ] = "Embed";
};
};
// ------------------------------------------------------
TabDialog RID_SVXDLG_AREA
{
......
This diff is collapsed.
......@@ -237,6 +237,7 @@ class SVX_DLLPUBLIC GradientLB : public ListBox
sal_Bool mbUserDraw;
public:
GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw = sal_True );
GradientLB( Window* pParent, WinBits aWB, sal_Bool bUserDraw = sal_True );
virtual void Fill( const XGradientListRef &pList );
virtual void UserDraw( const UserDrawEvent& rUDEvt );
......
......@@ -1073,6 +1073,21 @@ GradientLB::GradientLB( Window* pParent, ResId Id, sal_Bool bUserDraw /*= sal_Tr
EnableUserDraw( mbUserDraw);
}
GradientLB::GradientLB( Window* pParent, WinBits nWinStyle, sal_Bool bUserDraw /*= sal_True*/ )
: ListBox( pParent, nWinStyle ),
mpList(NULL),
mbUserDraw( bUserDraw )
{
EnableUserDraw( mbUserDraw);
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeGradientLB(Window *pParent, VclBuilder::stringmap &)
{
GradientLB *pListBox = new GradientLB(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK|WB_SIMPLEMODE);
pListBox->EnableAutoSize(true);
return pListBox;
}
void GradientLB::Fill( const XGradientListRef &pList )
{
mpList = pList;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment