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:
Caolán McNamara
2014-12-28 16:30:18 +00:00
parent 04299dba24
commit 11d0c28601
9 changed files with 3006 additions and 2462 deletions

View File

@@ -337,6 +337,9 @@
<glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D" <glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D"
generic-name="3D Light Control" parent="GtkDrawingArea" generic-name="3D Light Control" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> 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" <glade-widget-class title="Frame Selector" name="svxlo-SvxFrameSelector"
generic-name="Frame Border Preview Window" parent="GtkDrawingArea" generic-name="Frame Border Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/> icon-name="widget-gtk-drawingarea"/>

View File

@@ -140,13 +140,10 @@
#define RID_SVXIL_FRAME (RID_SVX_START + 65) #define RID_SVXIL_FRAME (RID_SVX_START + 65)
#define RID_SVXIL_DATANAVI (RID_SVX_START + 66) #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_ON (RID_SVX_START + 210)
#define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211) #define RID_SVXIMAGE_LIGHT_OFF (RID_SVX_START + 211)
#define RID_SVXIMAGE_COLORDLG (RID_SVX_START + 214) #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_FAVORITE (RID_SVX_START + 73)
#define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74) #define RID_SVXFLOAT3D_FIX_X (RID_SVX_START + 74)
#define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75) #define RID_SVXFLOAT3D_FIX_Y (RID_SVX_START + 75)

View File

@@ -27,21 +27,15 @@
#include <svx/svxdllapi.h> #include <svx/svxdllapi.h>
#include <basegfx/vector/b3dvector.hxx> #include <basegfx/vector/b3dvector.hxx>
class FmFormModel; class FmFormModel;
class FmFormPage; class FmFormPage;
class E3dView; class E3dView;
class E3dPolyScene; class E3dPolyScene;
class E3dObject; class E3dObject;
#define PREVIEW_OBJECTTYPE_SPHERE 0x0000 #define PREVIEW_OBJECTTYPE_SPHERE 0x0000
#define PREVIEW_OBJECTTYPE_CUBE 0x0001 #define PREVIEW_OBJECTTYPE_CUBE 0x0001
class SVX_DLLPUBLIC Svx3DPreviewControl : public Control class SVX_DLLPUBLIC Svx3DPreviewControl : public Control
{ {
protected: protected:
@@ -55,13 +49,13 @@ protected:
void Construct(); void Construct();
public: public:
Svx3DPreviewControl(vcl::Window* pParent, const ResId& rResId);
Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0); Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle = 0);
virtual ~Svx3DPreviewControl(); virtual ~Svx3DPreviewControl();
virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE; virtual void Paint( const Rectangle& rRect ) SAL_OVERRIDE;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE; virtual void MouseButtonDown( const MouseEvent& rMEvt ) SAL_OVERRIDE;
virtual void Resize() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE;
virtual Size GetOptimalSize() const SAL_OVERRIDE;
void Reset(); void Reset();
virtual void SetObjectType(sal_uInt16 nType); virtual void SetObjectType(sal_uInt16 nType);
@@ -70,8 +64,6 @@ public:
virtual void Set3DAttributes(const SfxItemSet& rAttr); virtual void Set3DAttributes(const SfxItemSet& rAttr);
}; };
class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl class SVX_DLLPUBLIC Svx3DLightControl : public Svx3DPreviewControl
{ {
// Callback for interactive changes // Callback for interactive changes
@@ -149,8 +141,6 @@ public:
basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const; basegfx::B3DVector GetLightDirection(sal_uInt32 nNum) const;
}; };
class SVX_DLLPUBLIC SvxLightCtl3D : public Control class SVX_DLLPUBLIC SvxLightCtl3D : public Control
{ {
private: private:
@@ -165,8 +155,7 @@ private:
Link maUserSelectionChangeCallback; Link maUserSelectionChangeCallback;
public: public:
SvxLightCtl3D( vcl::Window* pParent, const ResId& rResId); SvxLightCtl3D(vcl::Window* pParent);
SvxLightCtl3D( vcl::Window* pParent);
virtual ~SvxLightCtl3D(); virtual ~SvxLightCtl3D();
// react to size changes // react to size changes

View File

@@ -60,134 +60,114 @@ class SVX_DLLPUBLIC Svx3DWin : public SfxDockingWindow
using Window::Update; using Window::Update;
private: private:
ImageButton aBtnGeo; PushButton* m_pBtnGeo;
ImageButton aBtnRepresentation; PushButton* m_pBtnRepresentation;
ImageButton aBtnLight; PushButton* m_pBtnLight;
ImageButton aBtnTexture; PushButton* m_pBtnTexture;
ImageButton aBtnMaterial; PushButton* m_pBtnMaterial;
ImageButton aBtnUpdate; PushButton* m_pBtnUpdate;
ImageButton aBtnAssign; PushButton* m_pBtnAssign;
// geometry // geometry
FixedLine aFLGeometrie; VclContainer* m_pFLGeometrie;
FixedText aFtPercentDiagonal; FixedText* m_pFtPercentDiagonal;
MetricField aMtrPercentDiagonal; MetricField* m_pMtrPercentDiagonal;
FixedText aFtBackscale; FixedText* m_pFtBackscale;
MetricField aMtrBackscale; MetricField* m_pMtrBackscale;
FixedText aFtEndAngle; FixedText* m_pFtEndAngle;
MetricField aMtrEndAngle; MetricField* m_pMtrEndAngle;
FixedText aFtDepth; FixedText* m_pFtDepth;
MetricField aMtrDepth; MetricField* m_pMtrDepth;
FixedLine aFLSegments;
FixedText aFtHorizontal; VclContainer* m_pFLSegments;
NumericField aNumHorizontal; NumericField* m_pNumHorizontal;
FixedText aFtVertical; NumericField* m_pNumVertical;
NumericField aNumVertical;
FixedLine aFLNormals;
ImageButton aBtnNormalsObj; VclContainer* m_pFLNormals;
ImageButton aBtnNormalsFlat; PushButton* m_pBtnNormalsObj;
ImageButton aBtnNormalsSphere; PushButton* m_pBtnNormalsFlat;
ImageButton aBtnNormalsInvert; PushButton* m_pBtnNormalsSphere;
ImageButton aBtnTwoSidedLighting; PushButton* m_pBtnNormalsInvert;
PushButton* m_pBtnTwoSidedLighting;
PushButton* m_pBtnDoubleSided;
ImageButton aBtnDoubleSided;
FixedLine aFLRepresentation;
// presentation // presentation
FixedText aFtShademode; VclContainer* m_pFLRepresentation;
ListBox aLbShademode; ListBox* m_pLbShademode;
FixedLine aFLShadow;
ImageButton aBtnShadow3d; VclContainer* m_pFLShadow;
FixedText aFtSlant; PushButton* m_pBtnShadow3d;
MetricField aMtrSlant; FixedText* m_pFtSlant;
FixedText aFtDistance; MetricField* m_pMtrSlant;
MetricField aMtrDistance;
FixedText aFtFocalLeng; VclContainer* m_pFLCamera;
MetricField aMtrFocalLength; MetricField* m_pMtrDistance;
FixedLine aFLCamera; MetricField* m_pMtrFocalLength;
FixedLine aFLLight;
// lighting // lighting
ImageButton aBtnLight1; VclContainer* m_pFLLight;
ImageButton aBtnLight2; PushButton* m_pBtnLight1;
ImageButton aBtnLight3; PushButton* m_pBtnLight2;
ImageButton aBtnLight4; PushButton* m_pBtnLight3;
ImageButton aBtnLight5; PushButton* m_pBtnLight4;
ImageButton aBtnLight6; PushButton* m_pBtnLight5;
ImageButton aBtnLight7; PushButton* m_pBtnLight6;
ImageButton aBtnLight8; PushButton* m_pBtnLight7;
FixedText aFTLightsource; PushButton* m_pBtnLight8;
ColorLB aLbLight1; ColorLB* m_pLbLight1;
ColorLB aLbLight2; ColorLB* m_pLbLight2;
ColorLB aLbLight3; ColorLB* m_pLbLight3;
ColorLB aLbLight4; ColorLB* m_pLbLight4;
ColorLB aLbLight5; ColorLB* m_pLbLight5;
ColorLB aLbLight6; ColorLB* m_pLbLight6;
ColorLB aLbLight7; ColorLB* m_pLbLight7;
ColorLB aLbLight8; ColorLB* m_pLbLight8;
PushButton* m_pBtnLightColor;
ImageButton aBtnLightColor; ColorLB* m_pLbAmbientlight; // ListBox
PushButton* m_pBtnAmbientColor; // color button
// #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;
// Textures // Textures
FixedText aFtTexKind; VclContainer* m_pFLTexture;
ImageButton aBtnTexLuminance; PushButton* m_pBtnTexLuminance;
ImageButton aBtnTexColor; PushButton* m_pBtnTexColor;
FixedText aFtTexMode; PushButton* m_pBtnTexReplace;
ImageButton aBtnTexReplace; PushButton* m_pBtnTexModulate;
ImageButton aBtnTexModulate; PushButton* m_pBtnTexBlend;
ImageButton aBtnTexBlend; PushButton* m_pBtnTexObjectX;
FixedText aFtTexProjectionX; PushButton* m_pBtnTexParallelX;
ImageButton aBtnTexObjectX; PushButton* m_pBtnTexCircleX;
ImageButton aBtnTexParallelX; PushButton* m_pBtnTexObjectY;
ImageButton aBtnTexCircleX; PushButton* m_pBtnTexParallelY;
FixedText aFtTexProjectionY; PushButton* m_pBtnTexCircleY;
ImageButton aBtnTexObjectY; PushButton* m_pBtnTexFilter;
ImageButton aBtnTexParallelY;
ImageButton aBtnTexCircleY;
FixedText aFtTexFilter;
ImageButton aBtnTexFilter;
// material // material
// material editor // material editor
FixedLine aFLMaterial; VclContainer* m_pFLMaterial;
FixedText aFtMatFavorites; ListBox* m_pLbMatFavorites;
ListBox aLbMatFavorites; ColorLB* m_pLbMatColor;
FixedText aFtMatColor; PushButton* m_pBtnMatColor;
ColorLB aLbMatColor; ColorLB* m_pLbMatEmission;
ImageButton aBtnMatColor; PushButton* m_pBtnEmissionColor;
FixedText aFtMatEmission;
ColorLB aLbMatEmission;
ImageButton aBtnEmissionColor;
FixedLine aFLMatSpecular;
FixedText aFtMatSpecular;
ColorLB aLbMatSpecular;
ImageButton aBtnSpecularColor;
FixedText aFtMatSpecularIntensity;
MetricField aMtrMatSpecularIntensity;
Svx3DPreviewControl aCtlPreview; VclContainer* m_pFLMatSpecular;
SvxLightCtl3D aCtlLightPreview; ColorLB* m_pLbMatSpecular;
PushButton* m_pBtnSpecularColor;
MetricField* m_pMtrMatSpecularIntensity;
Svx3DPreviewControl* m_pCtlPreview;
SvxLightCtl3D* m_pCtlLightPreview;
// bottom part // bottom part
ImageButton aBtnConvertTo3D; PushButton* m_pBtnConvertTo3D;
ImageButton aBtnLatheObject; PushButton* m_pBtnLatheObject;
ImageButton aBtnPerspective; PushButton* m_pBtnPerspective;
// the rest ... // the rest ...
Image aImgLightOn; Image aImgLightOn;
Image aImgLightOff; Image aImgLightOff;
bool bUpdate; bool bUpdate;
ViewType3D eViewType; ViewType3D eViewType;
Size aSize;
// Model, Page, View etc. for favourites // Model, Page, View etc. for favourites
FmFormModel* pModel; FmFormModel* pModel;
@@ -230,8 +210,8 @@ private:
SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn = NULL ); SVX_DLLPRIVATE sal_uInt16 GetLightSource( const PushButton* pBtn = NULL );
SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL ); SVX_DLLPRIVATE ColorLB* GetLbByButton( const PushButton* pBtn = NULL );
SVX_DLLPRIVATE bool GetUILightState( const ImageButton& rBtn ) const; SVX_DLLPRIVATE bool GetUILightState( const PushButton& rBtn ) const;
SVX_DLLPRIVATE void SetUILightState( ImageButton& aBtn, bool bState ); SVX_DLLPRIVATE void SetUILightState( PushButton& aBtn, bool bState );
protected: protected:
virtual void Resize() SAL_OVERRIDE; virtual void Resize() SAL_OVERRIDE;

View File

@@ -25,6 +25,7 @@ $(eval $(call gb_UIConfig_add_uifiles,svx,\
svx/uiconfig/ui/datanavigator \ svx/uiconfig/ui/datanavigator \
svx/uiconfig/ui/deleteheaderdialog \ svx/uiconfig/ui/deleteheaderdialog \
svx/uiconfig/ui/deletefooterdialog \ svx/uiconfig/ui/deletefooterdialog \
svx/uiconfig/ui/docking3deffects \
svx/uiconfig/ui/dockingcolorreplace \ svx/uiconfig/ui/dockingcolorreplace \
svx/uiconfig/ui/docrecoverybrokendialog \ svx/uiconfig/ui/docrecoverybrokendialog \
svx/uiconfig/ui/docrecoveryprogressdialog \ svx/uiconfig/ui/docrecoveryprogressdialog \

View File

@@ -41,22 +41,6 @@
using namespace com::sun::star; 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) Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
: Control(pParent, nStyle), : Control(pParent, nStyle),
mpModel(0), mpModel(0),
@@ -73,6 +57,16 @@ Svx3DPreviewControl::Svx3DPreviewControl(vcl::Window* pParent, WinBits nStyle)
SetBackground(); 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() Svx3DPreviewControl::~Svx3DPreviewControl()
{ {
delete mp3DView; delete mp3DView;
@@ -952,19 +946,6 @@ basegfx::B3DVector Svx3DLightControl::GetLightDirection(sal_uInt32 nNum) const
return basegfx::B3DVector(); 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) SvxLightCtl3D::SvxLightCtl3D( vcl::Window* pParent)
: Control(pParent, WB_BORDER | WB_TABSTOP), : Control(pParent, WB_BORDER | WB_TABSTOP),
maLightControl(this, 0), maLightControl(this, 0),
@@ -986,7 +967,6 @@ extern "C" SAL_DLLPUBLIC_EXPORT vcl::Window* SAL_CALL makeSvxLightCtl3D(vcl::Win
return new SvxLightCtl3D(pParent); return new SvxLightCtl3D(pParent);
} }
void SvxLightCtl3D::Init() void SvxLightCtl3D::Init()
{ {
// #i58240# set HelpIDs for scrollbars and switcher // #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

File diff suppressed because it is too large Load Diff