convert RID_SVXFLOAT_3D docking window to .ui
This is an epic dialog with lots of moving parts Change-Id: I4e53580ac5b01f4a717d2fe594a18c8e83b45a6f
This commit is contained in:
parent
04299dba24
commit
11d0c28601
@ -337,6 +337,9 @@
|
||||
<glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D"
|
||||
generic-name="3D Light Control" parent="GtkDrawingArea"
|
||||
icon-name="widget-gtk-drawingarea"/>
|
||||
<glade-widget-class title="Svx 3D Preview Control" name="svxlo-Svx3DPreviewControl"
|
||||
generic-name="3D Preview Control" parent="GtkDrawingArea"
|
||||
icon-name="widget-gtk-drawingarea"/>
|
||||
<glade-widget-class title="Frame Selector" name="svxlo-SvxFrameSelector"
|
||||
generic-name="Frame Border Preview Window" parent="GtkDrawingArea"
|
||||
icon-name="widget-gtk-drawingarea"/>
|
||||
|
@ -140,13 +140,10 @@
|
||||
#define RID_SVXIL_FRAME (RID_SVX_START + 65)
|
||||
#define RID_SVXIL_DATANAVI (RID_SVX_START + 66)
|
||||
|
||||
#define RID_SVXFLOAT_3D (RID_SVX_START + 209)
|
||||
|
||||
#define RID_SVXIMAGE_LIGHT_ON (RID_SVX_START + 210)
|
||||
#define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211)
|
||||
#define RID_SVXIMAGE_COLORDLG (RID_SVX_START + 214)
|
||||
|
||||
#define RID_SVXFLOAT3D_COLOR_LIGHT_PRE (RID_SVX_START + 72)
|
||||
#define RID_SVXFLOAT3D_FAVORITE (RID_SVX_START + 73)
|
||||
#define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74)
|
||||
#define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75)
|
||||
|
@ -27,21 +27,15 @@
|
||||
#include <svx/svxdllapi.h>
|
||||
#include <basegfx/vector/b3dvector.hxx>
|
||||
|
||||
|
||||
|
||||
class FmFormModel;
|
||||
class FmFormPage;
|
||||
class E3dView;
|
||||
class E3dPolyScene;
|
||||
class E3dObject;
|
||||
|
||||
|
||||
|
||||
#define PREVIEW_OBJECTTYPE_SPHERE 0x0000
|
||||
#define PREVIEW_OBJECTTYPE_CUBE 0x0001
|
||||
|
||||
|
||||
|
||||
class SVX_DLLPUBLIC Svx3DPreviewControl : public Control
|
||||
{
|
||||
protected:
|
||||
@ -55,13 +49,13 @@ protected:
|
||||
void Construct();
|
||||
|
||||
public:
|
||||
Svx3DPreviewControl(vcl::Window* pParent, const ResId& rResId);
|
||||
Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0);
|
||||
virtual ~Svx3DPreviewControl();
|
||||
|
||||
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
|
||||
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
|
||||
virtual void Resize() SAL_OVERRIDE;
|
||||
virtual Size GetOptimalSize() const SAL_OVERRIDE;
|
||||
|
||||
void Reset();
|
||||
virtual void SetObjectType(sal_uInt16 nType);
|
||||
@ -70,8 +64,6 @@ public:
|
||||
virtual void Set3DAttributes(const SfxItemSet& rAttr);
|
||||
};
|
||||
|
||||
|
||||
|
||||
class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl
|
||||
{
|
||||
// Callback for interactive changes
|
||||
@ -149,8 +141,6 @@ public:
|
||||
basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const;
|
||||
};
|
||||
|
||||
|
||||
|
||||
class SVX_DLLPUBLIC SvxLightCtl3D : public Control
|
||||
{
|
||||
private:
|
||||
@ -165,7 +155,6 @@ private:
|
||||
Link maUserSelectionChangeCallback;
|
||||
|
||||
public:
|
||||
SvxLightCtl3D( vcl::Window* pParent, const ResId& rResId);
|
||||
SvxLightCtl3D(vcl::Window* pParent);
|
||||
virtual ~SvxLightCtl3D();
|
||||
|
||||
|
@ -60,134 +60,114 @@ class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow
|
||||
using Window::Update;
|
||||
|
||||
private:
|
||||
ImageButton aBtnGeo;
|
||||
ImageButton aBtnRepresentation;
|
||||
ImageButton aBtnLight;
|
||||
ImageButton aBtnTexture;
|
||||
ImageButton aBtnMaterial;
|
||||
ImageButton aBtnUpdate;
|
||||
ImageButton aBtnAssign;
|
||||
PushButton* m_pBtnGeo;
|
||||
PushButton* m_pBtnRepresentation;
|
||||
PushButton* m_pBtnLight;
|
||||
PushButton* m_pBtnTexture;
|
||||
PushButton* m_pBtnMaterial;
|
||||
PushButton* m_pBtnUpdate;
|
||||
PushButton* m_pBtnAssign;
|
||||
|
||||
// geometry
|
||||
FixedLine aFLGeometrie;
|
||||
FixedText aFtPercentDiagonal;
|
||||
MetricField aMtrPercentDiagonal;
|
||||
FixedText aFtBackscale;
|
||||
MetricField aMtrBackscale;
|
||||
FixedText aFtEndAngle;
|
||||
MetricField aMtrEndAngle;
|
||||
FixedText aFtDepth;
|
||||
MetricField aMtrDepth;
|
||||
FixedLine aFLSegments;
|
||||
VclContainer* m_pFLGeometrie;
|
||||
FixedText* m_pFtPercentDiagonal;
|
||||
MetricField* m_pMtrPercentDiagonal;
|
||||
FixedText* m_pFtBackscale;
|
||||
MetricField* m_pMtrBackscale;
|
||||
FixedText* m_pFtEndAngle;
|
||||
MetricField* m_pMtrEndAngle;
|
||||
FixedText* m_pFtDepth;
|
||||
MetricField* m_pMtrDepth;
|
||||
|
||||
FixedText aFtHorizontal;
|
||||
NumericField aNumHorizontal;
|
||||
FixedText aFtVertical;
|
||||
NumericField aNumVertical;
|
||||
FixedLine aFLNormals;
|
||||
VclContainer* m_pFLSegments;
|
||||
NumericField* m_pNumHorizontal;
|
||||
NumericField* m_pNumVertical;
|
||||
|
||||
ImageButton aBtnNormalsObj;
|
||||
ImageButton aBtnNormalsFlat;
|
||||
ImageButton aBtnNormalsSphere;
|
||||
ImageButton aBtnNormalsInvert;
|
||||
ImageButton aBtnTwoSidedLighting;
|
||||
VclContainer* m_pFLNormals;
|
||||
PushButton* m_pBtnNormalsObj;
|
||||
PushButton* m_pBtnNormalsFlat;
|
||||
PushButton* m_pBtnNormalsSphere;
|
||||
PushButton* m_pBtnNormalsInvert;
|
||||
PushButton* m_pBtnTwoSidedLighting;
|
||||
PushButton* m_pBtnDoubleSided;
|
||||
|
||||
ImageButton aBtnDoubleSided;
|
||||
FixedLine aFLRepresentation;
|
||||
// presentation
|
||||
FixedText aFtShademode;
|
||||
ListBox aLbShademode;
|
||||
FixedLine aFLShadow;
|
||||
ImageButton aBtnShadow3d;
|
||||
FixedText aFtSlant;
|
||||
MetricField aMtrSlant;
|
||||
FixedText aFtDistance;
|
||||
MetricField aMtrDistance;
|
||||
FixedText aFtFocalLeng;
|
||||
MetricField aMtrFocalLength;
|
||||
FixedLine aFLCamera;
|
||||
FixedLine aFLLight;
|
||||
VclContainer* m_pFLRepresentation;
|
||||
ListBox* m_pLbShademode;
|
||||
|
||||
VclContainer* m_pFLShadow;
|
||||
PushButton* m_pBtnShadow3d;
|
||||
FixedText* m_pFtSlant;
|
||||
MetricField* m_pMtrSlant;
|
||||
|
||||
VclContainer* m_pFLCamera;
|
||||
MetricField* m_pMtrDistance;
|
||||
MetricField* m_pMtrFocalLength;
|
||||
|
||||
// lighting
|
||||
ImageButton aBtnLight1;
|
||||
ImageButton aBtnLight2;
|
||||
ImageButton aBtnLight3;
|
||||
ImageButton aBtnLight4;
|
||||
ImageButton aBtnLight5;
|
||||
ImageButton aBtnLight6;
|
||||
ImageButton aBtnLight7;
|
||||
ImageButton aBtnLight8;
|
||||
FixedText aFTLightsource;
|
||||
ColorLB aLbLight1;
|
||||
ColorLB aLbLight2;
|
||||
ColorLB aLbLight3;
|
||||
ColorLB aLbLight4;
|
||||
ColorLB aLbLight5;
|
||||
ColorLB aLbLight6;
|
||||
ColorLB aLbLight7;
|
||||
ColorLB aLbLight8;
|
||||
|
||||
ImageButton aBtnLightColor;
|
||||
|
||||
// #99694# Keyboard shortcuts activate the next control, so the
|
||||
// order needed to be changed here
|
||||
FixedText aFTAmbientlight; // Text label
|
||||
ColorLB aLbAmbientlight; // ListBox
|
||||
ImageButton aBtnAmbientColor; // color button
|
||||
|
||||
FixedLine aFLTexture;
|
||||
VclContainer* m_pFLLight;
|
||||
PushButton* m_pBtnLight1;
|
||||
PushButton* m_pBtnLight2;
|
||||
PushButton* m_pBtnLight3;
|
||||
PushButton* m_pBtnLight4;
|
||||
PushButton* m_pBtnLight5;
|
||||
PushButton* m_pBtnLight6;
|
||||
PushButton* m_pBtnLight7;
|
||||
PushButton* m_pBtnLight8;
|
||||
ColorLB* m_pLbLight1;
|
||||
ColorLB* m_pLbLight2;
|
||||
ColorLB* m_pLbLight3;
|
||||
ColorLB* m_pLbLight4;
|
||||
ColorLB* m_pLbLight5;
|
||||
ColorLB* m_pLbLight6;
|
||||
ColorLB* m_pLbLight7;
|
||||
ColorLB* m_pLbLight8;
|
||||
PushButton* m_pBtnLightColor;
|
||||
ColorLB* m_pLbAmbientlight; // ListBox
|
||||
PushButton* m_pBtnAmbientColor; // color button
|
||||
|
||||
// Textures
|
||||
FixedText aFtTexKind;
|
||||
ImageButton aBtnTexLuminance;
|
||||
ImageButton aBtnTexColor;
|
||||
FixedText aFtTexMode;
|
||||
ImageButton aBtnTexReplace;
|
||||
ImageButton aBtnTexModulate;
|
||||
ImageButton aBtnTexBlend;
|
||||
FixedText aFtTexProjectionX;
|
||||
ImageButton aBtnTexObjectX;
|
||||
ImageButton aBtnTexParallelX;
|
||||
ImageButton aBtnTexCircleX;
|
||||
FixedText aFtTexProjectionY;
|
||||
ImageButton aBtnTexObjectY;
|
||||
ImageButton aBtnTexParallelY;
|
||||
ImageButton aBtnTexCircleY;
|
||||
FixedText aFtTexFilter;
|
||||
ImageButton aBtnTexFilter;
|
||||
VclContainer* m_pFLTexture;
|
||||
PushButton* m_pBtnTexLuminance;
|
||||
PushButton* m_pBtnTexColor;
|
||||
PushButton* m_pBtnTexReplace;
|
||||
PushButton* m_pBtnTexModulate;
|
||||
PushButton* m_pBtnTexBlend;
|
||||
PushButton* m_pBtnTexObjectX;
|
||||
PushButton* m_pBtnTexParallelX;
|
||||
PushButton* m_pBtnTexCircleX;
|
||||
PushButton* m_pBtnTexObjectY;
|
||||
PushButton* m_pBtnTexParallelY;
|
||||
PushButton* m_pBtnTexCircleY;
|
||||
PushButton* m_pBtnTexFilter;
|
||||
|
||||
// material
|
||||
// material editor
|
||||
FixedLine aFLMaterial;
|
||||
FixedText aFtMatFavorites;
|
||||
ListBox aLbMatFavorites;
|
||||
FixedText aFtMatColor;
|
||||
ColorLB aLbMatColor;
|
||||
ImageButton aBtnMatColor;
|
||||
FixedText aFtMatEmission;
|
||||
ColorLB aLbMatEmission;
|
||||
ImageButton aBtnEmissionColor;
|
||||
FixedLine aFLMatSpecular;
|
||||
FixedText aFtMatSpecular;
|
||||
ColorLB aLbMatSpecular;
|
||||
ImageButton aBtnSpecularColor;
|
||||
FixedText aFtMatSpecularIntensity;
|
||||
MetricField aMtrMatSpecularIntensity;
|
||||
VclContainer* m_pFLMaterial;
|
||||
ListBox* m_pLbMatFavorites;
|
||||
ColorLB* m_pLbMatColor;
|
||||
PushButton* m_pBtnMatColor;
|
||||
ColorLB* m_pLbMatEmission;
|
||||
PushButton* m_pBtnEmissionColor;
|
||||
|
||||
Svx3DPreviewControl aCtlPreview;
|
||||
SvxLightCtl3D aCtlLightPreview;
|
||||
VclContainer* m_pFLMatSpecular;
|
||||
ColorLB* m_pLbMatSpecular;
|
||||
PushButton* m_pBtnSpecularColor;
|
||||
MetricField* m_pMtrMatSpecularIntensity;
|
||||
|
||||
Svx3DPreviewControl* m_pCtlPreview;
|
||||
SvxLightCtl3D* m_pCtlLightPreview;
|
||||
|
||||
// bottom part
|
||||
ImageButton aBtnConvertTo3D;
|
||||
ImageButton aBtnLatheObject;
|
||||
ImageButton aBtnPerspective;
|
||||
PushButton* m_pBtnConvertTo3D;
|
||||
PushButton* m_pBtnLatheObject;
|
||||
PushButton* m_pBtnPerspective;
|
||||
|
||||
// the rest ...
|
||||
Image aImgLightOn;
|
||||
Image aImgLightOff;
|
||||
bool bUpdate;
|
||||
ViewType3D eViewType;
|
||||
Size aSize;
|
||||
|
||||
// Model, Page, View etc. for favourites
|
||||
FmFormModel* pModel;
|
||||
@ -230,8 +210,8 @@ private:
|
||||
SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn = NULL );
|
||||
SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL );
|
||||
|
||||
SVX_DLLPRIVATE bool GetUILightState( const ImageButton& rBtn ) const;
|
||||
SVX_DLLPRIVATE void SetUILightState( ImageButton& aBtn, bool bState );
|
||||
SVX_DLLPRIVATE bool GetUILightState( const PushButton& rBtn ) const;
|
||||
SVX_DLLPRIVATE void SetUILightState( PushButton& aBtn, bool bState );
|
||||
|
||||
protected:
|
||||
virtual void Resize() SAL_OVERRIDE;
|
||||
|
@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
|
||||
svx/uiconfig/ui/datanavigator \
|
||||
svx/uiconfig/ui/deleteheaderdialog \
|
||||
svx/uiconfig/ui/deletefooterdialog \
|
||||
svx/uiconfig/ui/docking3deffects \
|
||||
svx/uiconfig/ui/dockingcolorreplace \
|
||||
svx/uiconfig/ui/docrecoverybrokendialog \
|
||||
svx/uiconfig/ui/docrecoveryprogressdialog \
|
||||
|
@ -41,22 +41,6 @@
|
||||
|
||||
using namespace com::sun::star;
|
||||
|
||||
Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, const ResId& rResId)
|
||||
: Control(pParent, rResId),
|
||||
mpModel(0),
|
||||
mpFmPage(0),
|
||||
mp3DView(0),
|
||||
mpScene(0),
|
||||
mp3DObj(0),
|
||||
mnObjectType(PREVIEW_OBJECTTYPE_SPHERE)
|
||||
{
|
||||
Construct();
|
||||
|
||||
// do not paint background self, DrawingLayer paints this buffered and as page
|
||||
SetControlBackground();
|
||||
SetBackground();
|
||||
}
|
||||
|
||||
Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
|
||||
: Control(pParent, nStyle),
|
||||
mpModel(0),
|
||||
@ -73,6 +57,16 @@ Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
|
||||
SetBackground();
|
||||
}
|
||||
|
||||
Size Svx3DPreviewControl::GetOptimalSize() const
|
||||
{
|
||||
return LogicToPixel(Size(80, 100), MAP_APPFONT);
|
||||
}
|
||||
|
||||
extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvx3DPreviewControl(vcl::Window *pParent, VclBuilder::stringmap &)
|
||||
{
|
||||
return new Svx3DPreviewControl(pParent);
|
||||
}
|
||||
|
||||
Svx3DPreviewControl::~Svx3DPreviewControl()
|
||||
{
|
||||
delete mp3DView;
|
||||
@ -952,19 +946,6 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
|
||||
return basegfx::B3DVector();
|
||||
}
|
||||
|
||||
|
||||
|
||||
SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent, const ResId& rResId)
|
||||
: Control(pParent, rResId),
|
||||
maLightControl(this, 0),
|
||||
maHorScroller(this, WB_HORZ | WB_DRAG),
|
||||
maVerScroller(this, WB_VERT | WB_DRAG),
|
||||
maSwitcher(this, 0)
|
||||
{
|
||||
// init members
|
||||
Init();
|
||||
}
|
||||
|
||||
SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent)
|
||||
: Control(pParent, WB_BORDER | WB_TABSTOP),
|
||||
maLightControl(this, 0),
|
||||
@ -986,7 +967,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxLightCtl3D(vcl::Win
|
||||
return new SvxLightCtl3D(pParent);
|
||||
}
|
||||
|
||||
|
||||
void SvxLightCtl3D::Init()
|
||||
{
|
||||
// #i58240# set HelpIDs for scrollbars and switcher
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
2048
svx/uiconfig/ui/docking3deffects.ui
Normal file
2048
svx/uiconfig/ui/docking3deffects.ui
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user