weld FloatingContour
Change-Id: I055f01d2ce462009986801d4a603b0b72b1a621c Reviewed-on: https://gerrit.libreoffice.org/72787 Tested-by: Jenkins Reviewed-by: Caolán McNamara <caolanm@redhat.com> Tested-by: Caolán McNamara <caolanm@redhat.com>
This commit is contained in:
@@ -381,9 +381,6 @@
|
||||
generic-name="DriverListControl" parent="GtkEntry"
|
||||
icon-name="widget-gtk-combobox"/>
|
||||
|
||||
<glade-widget-class title="Statusbar" name="svxlo-StatusBar"
|
||||
generic-name="Statusbar" parent="GtkStatusbar"
|
||||
icon-name="widget-gtk-statusbar"/>
|
||||
<glade-widget-class title="DataTreeListBox" name="svxcorelo-DataTreeListBox"
|
||||
generic-name="DataTreeListBox" parent="GtkTreeView"
|
||||
icon-name="widget-gtk-treeview"/>
|
||||
|
||||
@@ -50,12 +50,9 @@ public:
|
||||
|
||||
class SvxSuperContourDlg;
|
||||
|
||||
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxContourDlg : public SfxFloatingWindow
|
||||
class SAL_WARN_UNUSED SVX_DLLPUBLIC SvxContourDlg : public SfxModelessDialogController
|
||||
{
|
||||
using Window::Update;
|
||||
|
||||
VclPtr<SvxSuperContourDlg> pSuperClass;
|
||||
|
||||
std::unique_ptr<SvxSuperContourDlg> m_xImpl;
|
||||
|
||||
protected:
|
||||
|
||||
@@ -63,15 +60,13 @@ protected:
|
||||
|
||||
public:
|
||||
|
||||
SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
|
||||
vcl::Window* pParent);
|
||||
SvxContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW, weld::Window* pParent);
|
||||
virtual ~SvxContourDlg() override;
|
||||
virtual void dispose() override;
|
||||
|
||||
const Graphic& GetGraphic() const;
|
||||
bool IsGraphicChanged() const;
|
||||
|
||||
tools::PolyPolygon GetPolyPolygon();
|
||||
tools::PolyPolygon GetPolyPolygon();
|
||||
|
||||
const void* GetEditingObject() const;
|
||||
|
||||
|
||||
@@ -477,7 +477,6 @@ custom_widgets = [
|
||||
'SidebarDialControl',
|
||||
'SidebarToolBox',
|
||||
'SpacingListBox',
|
||||
'StatusBar',
|
||||
'SvSimpleTableContainer',
|
||||
'SvTreeListBox',
|
||||
'SvtFileView',
|
||||
|
||||
@@ -37,6 +37,8 @@ svx/uiconfig/ui/findreplacedialog.ui://GtkLabel[@id='label7'] orphan-label
|
||||
svx/uiconfig/ui/findreplacedialog.ui://GtkLabel[@id='searchinlabel'] orphan-label
|
||||
svx/uiconfig/ui/findreplacedialog.ui://GtkComboBoxText[@id='calcsearchin'] no-labelled-by
|
||||
svx/uiconfig/ui/findreplacedialog.ui://GtkLabel[@id='searchdir'] orphan-label
|
||||
svx/uiconfig/ui/floatingcontour.ui://GtkLabel[@id='statuspos'] orphan-label
|
||||
svx/uiconfig/ui/floatingcontour.ui://GtkLabel[@id='statussize'] orphan-label
|
||||
svx/uiconfig/ui/fontworkgallerydialog.ui://GtkLabel[@id='label1'] orphan-label
|
||||
svx/uiconfig/ui/headfootformatpage.ui://GtkLabel[@id='labelHeaderFormat'] orphan-label
|
||||
svx/uiconfig/ui/headfootformatpage.ui://GtkLabel[@id='labelFooterFormat'] orphan-label
|
||||
|
||||
+178
-241
@@ -43,7 +43,7 @@
|
||||
#include "dlgunit.hxx"
|
||||
#include <vcl/weld.hxx>
|
||||
|
||||
SFX_IMPL_FLOATINGWINDOW_WITHID( SvxContourDlgChildWindow, SID_CONTOUR_DLG );
|
||||
SFX_IMPL_MODELESSDIALOGCONTOLLER_WITHID(SvxContourDlgChildWindow, SID_CONTOUR_DLG);
|
||||
|
||||
SvxContourDlgItem::SvxContourDlgItem( SvxSuperContourDlg& rContourDlg, SfxBindings& rBindings ) :
|
||||
SfxControllerItem ( SID_CONTOUR_EXEC, rBindings ),
|
||||
@@ -62,41 +62,24 @@ void SvxContourDlgItem::StateChanged( sal_uInt16 nSID, SfxItemState /*eState*/,
|
||||
}
|
||||
}
|
||||
|
||||
SvxContourDlgChildWindow::SvxContourDlgChildWindow( vcl::Window* _pParent, sal_uInt16 nId,
|
||||
SfxBindings* pBindings, SfxChildWinInfo const * pInfo ) :
|
||||
SfxChildWindow( _pParent, nId )
|
||||
SvxContourDlgChildWindow::SvxContourDlgChildWindow(vcl::Window* _pParent, sal_uInt16 nId,
|
||||
SfxBindings* pBindings, SfxChildWinInfo const * pInfo)
|
||||
: SfxChildWindow( _pParent, nId )
|
||||
{
|
||||
VclPtr<SvxSuperContourDlg> pDlg = VclPtr<SvxSuperContourDlg>::Create(pBindings, this, _pParent);
|
||||
SetWindow(pDlg);
|
||||
|
||||
if ( pInfo->nFlags & SfxChildWindowFlags::ZOOMIN )
|
||||
pDlg->RollUp();
|
||||
|
||||
SetController(std::make_shared<SvxContourDlg>(pBindings, this, _pParent->GetFrameWeld()));
|
||||
SvxContourDlg* pDlg = static_cast<SvxContourDlg*>(GetController().get());
|
||||
pDlg->Initialize( pInfo );
|
||||
}
|
||||
|
||||
SvxContourDlg::SvxContourDlg(SfxBindings* _pBindings, SfxChildWindow* pCW,
|
||||
vcl::Window* _pParent)
|
||||
: SfxFloatingWindow(_pBindings, pCW, _pParent , "FloatingContour",
|
||||
"svx/ui/floatingcontour.ui")
|
||||
, pSuperClass(nullptr)
|
||||
weld::Window* _pParent)
|
||||
: SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/floatingcontour.ui", "FloatingContour")
|
||||
, m_xImpl(std::make_unique<SvxSuperContourDlg>(*m_xBuilder, *m_xDialog, _pBindings))
|
||||
{
|
||||
}
|
||||
|
||||
SvxContourDlg::~SvxContourDlg()
|
||||
{
|
||||
disposeOnce();
|
||||
}
|
||||
|
||||
void SvxContourDlg::dispose()
|
||||
{
|
||||
pSuperClass.clear();
|
||||
SfxFloatingWindow::dispose();
|
||||
}
|
||||
|
||||
void SvxContourDlg::SetSuperClass( SvxSuperContourDlg& rSuperClass )
|
||||
{
|
||||
pSuperClass = &rSuperClass;
|
||||
}
|
||||
|
||||
tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
|
||||
@@ -188,106 +171,65 @@ tools::PolyPolygon SvxContourDlg::CreateAutoContour( const Graphic& rGraphic,
|
||||
|
||||
const Graphic& SvxContourDlg::GetGraphic() const
|
||||
{
|
||||
return pSuperClass->GetGraphic();
|
||||
return m_xImpl->GetGraphic();
|
||||
}
|
||||
|
||||
bool SvxContourDlg::IsGraphicChanged() const
|
||||
{
|
||||
return pSuperClass->IsGraphicChanged();
|
||||
return m_xImpl->IsGraphicChanged();
|
||||
}
|
||||
|
||||
tools::PolyPolygon SvxContourDlg::GetPolyPolygon()
|
||||
{
|
||||
return pSuperClass->GetPolyPolygon();
|
||||
return m_xImpl->GetPolyPolygon();
|
||||
}
|
||||
|
||||
const void* SvxContourDlg::GetEditingObject() const
|
||||
{
|
||||
return pSuperClass->GetEditingObject();
|
||||
return m_xImpl->GetEditingObject();
|
||||
}
|
||||
|
||||
void SvxContourDlg::Update( const Graphic& rGraphic, bool bGraphicLinked,
|
||||
const tools::PolyPolygon* pPolyPoly, void* pEditingObj )
|
||||
{
|
||||
pSuperClass->UpdateGraphic( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj );
|
||||
m_xImpl->UpdateGraphic( rGraphic, bGraphicLinked, pPolyPoly, pEditingObj );
|
||||
}
|
||||
|
||||
SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *pCW,
|
||||
vcl::Window* _pParent) :
|
||||
SvxContourDlg ( _pBindings, pCW, _pParent ),
|
||||
aUpdateIdle ( "SvxSuperContourDlg UpdateIdle" ),
|
||||
aCreateIdle ( "SvxSuperContourDlg CreateIdle" ),
|
||||
pUpdateEditingObject( nullptr ),
|
||||
pCheckObj ( nullptr ),
|
||||
aContourItem ( *this, *_pBindings ),
|
||||
mnGrfChanged ( 0 ),
|
||||
bExecState ( false ),
|
||||
bUpdateGraphicLinked( false ),
|
||||
bGraphicLinked ( false )
|
||||
SvxSuperContourDlg::SvxSuperContourDlg(weld::Builder& rBuilder,
|
||||
weld::Dialog& rDialog, SfxBindings* pBindings)
|
||||
: aUpdateIdle( "SvxSuperContourDlg UpdateIdle" )
|
||||
, aCreateIdle( "SvxSuperContourDlg CreateIdle" )
|
||||
, mpBindings(pBindings)
|
||||
, pUpdateEditingObject( nullptr )
|
||||
, pCheckObj( nullptr )
|
||||
, aContourItem( *this, *pBindings )
|
||||
, mnGrfChanged( 0 )
|
||||
, bExecState( false )
|
||||
, bUpdateGraphicLinked( false )
|
||||
, bGraphicLinked( false )
|
||||
, m_rDialog(rDialog)
|
||||
, m_xContourWnd(new ContourWindow(&rDialog))
|
||||
, m_xStbStatusColor(new StatusColor(*m_xContourWnd))
|
||||
, m_xTbx1(rBuilder.weld_toolbar("toolbar"))
|
||||
, m_xMtfTolerance(rBuilder.weld_metric_spin_button("spinbutton", FieldUnit::PERCENT))
|
||||
, m_xStbStatus2(rBuilder.weld_label("statuspos"))
|
||||
, m_xStbStatus3(rBuilder.weld_label("statussize"))
|
||||
, m_xCancelBtn(rBuilder.weld_button("cancel"))
|
||||
, m_xStbStatusColorWeld(new weld::CustomWeld(rBuilder, "statuscolor", *m_xStbStatusColor))
|
||||
, m_xContourWndWeld(new weld::CustomWeld(rBuilder, "container", *m_xContourWnd))
|
||||
{
|
||||
get(m_pTbx1, "toolbar");
|
||||
get(m_pMtfTolerance, "spinbutton");
|
||||
m_pContourWnd = VclPtr<ContourWindow>::Create(get<vcl::Window>("container"), WB_BORDER);
|
||||
m_pContourWnd->set_hexpand(true);
|
||||
m_pContourWnd->set_vexpand(true);
|
||||
m_pContourWnd->Show();
|
||||
get(m_pStbStatus, "statusbar");
|
||||
m_xCancelBtn->connect_clicked(LINK(this, SvxSuperContourDlg, CancelHdl));
|
||||
|
||||
mnApplyId = m_pTbx1->GetItemId("TBI_APPLY");
|
||||
mnWorkSpaceId = m_pTbx1->GetItemId("TBI_WORKPLACE");
|
||||
m_pTbx1->SetItemBits(mnWorkSpaceId, ToolBoxItemBits::AUTOCHECK);
|
||||
mnSelectId = m_pTbx1->GetItemId("TBI_SELECT");
|
||||
m_pTbx1->SetItemBits(mnSelectId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnRectId = m_pTbx1->GetItemId("TBI_RECT");
|
||||
m_pTbx1->SetItemBits(mnRectId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnCircleId = m_pTbx1->GetItemId("TBI_CIRCLE");
|
||||
m_pTbx1->SetItemBits(mnCircleId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnPolyId = m_pTbx1->GetItemId("TBI_POLY");
|
||||
m_pTbx1->SetItemBits(mnPolyId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnPolyEditId = m_pTbx1->GetItemId("TBI_POLYEDIT");
|
||||
m_pTbx1->SetItemBits(mnPolyEditId, ToolBoxItemBits::AUTOCHECK);
|
||||
mnPolyMoveId = m_pTbx1->GetItemId("TBI_POLYMOVE");
|
||||
m_pTbx1->SetItemBits(mnPolyMoveId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnPolyInsertId = m_pTbx1->GetItemId("TBI_POLYINSERT");
|
||||
m_pTbx1->SetItemBits(mnPolyInsertId, ToolBoxItemBits::RADIOCHECK | ToolBoxItemBits::AUTOCHECK);
|
||||
mnPolyDeleteId = m_pTbx1->GetItemId("TBI_POLYDELETE");
|
||||
mnAutoContourId = m_pTbx1->GetItemId("TBI_AUTOCONTOUR");
|
||||
mnUndoId = m_pTbx1->GetItemId("TBI_UNDO");
|
||||
mnRedoId = m_pTbx1->GetItemId("TBI_REDO");
|
||||
mnPipetteId = m_pTbx1->GetItemId("TBI_PIPETTE");
|
||||
m_pTbx1->SetItemBits(mnPipetteId, ToolBoxItemBits::AUTOCHECK);
|
||||
m_xContourWnd->SetMousePosLink( LINK( this, SvxSuperContourDlg, MousePosHdl ) );
|
||||
m_xContourWnd->SetGraphSizeLink( LINK( this, SvxSuperContourDlg, GraphSizeHdl ) );
|
||||
m_xContourWnd->SetUpdateLink( LINK( this, SvxSuperContourDlg, StateHdl ) );
|
||||
m_xContourWnd->SetPipetteHdl( LINK( this, SvxSuperContourDlg, PipetteHdl ) );
|
||||
m_xContourWnd->SetPipetteClickHdl( LINK( this, SvxSuperContourDlg, PipetteClickHdl ) );
|
||||
m_xContourWnd->SetWorkplaceClickHdl( LINK( this, SvxSuperContourDlg, WorkplaceClickHdl ) );
|
||||
|
||||
SvxContourDlg::SetSuperClass( *this );
|
||||
m_xTbx1->connect_clicked( LINK( this, SvxSuperContourDlg, Tbx1ClickHdl ) );
|
||||
|
||||
m_pContourWnd->SetMousePosLink( LINK( this, SvxSuperContourDlg, MousePosHdl ) );
|
||||
m_pContourWnd->SetGraphSizeLink( LINK( this, SvxSuperContourDlg, GraphSizeHdl ) );
|
||||
m_pContourWnd->SetUpdateLink( LINK( this, SvxSuperContourDlg, StateHdl ) );
|
||||
m_pContourWnd->SetPipetteHdl( LINK( this, SvxSuperContourDlg, PipetteHdl ) );
|
||||
m_pContourWnd->SetPipetteClickHdl( LINK( this, SvxSuperContourDlg, PipetteClickHdl ) );
|
||||
m_pContourWnd->SetWorkplaceClickHdl( LINK( this, SvxSuperContourDlg, WorkplaceClickHdl ) );
|
||||
|
||||
const Size aTbxSize( m_pTbx1->CalcWindowSizePixel() );
|
||||
Point aPos( m_pTbx1->GetPosPixel() );
|
||||
SvtMiscOptions aMiscOptions;
|
||||
|
||||
aMiscOptions.AddListenerLink( LINK( this, SvxSuperContourDlg, MiscHdl ) );
|
||||
|
||||
m_pTbx1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
|
||||
m_pTbx1->SetSizePixel( aTbxSize );
|
||||
m_pTbx1->SetSelectHdl( LINK( this, SvxSuperContourDlg, Tbx1ClickHdl ) );
|
||||
|
||||
aPos.AdjustX(aTbxSize.Width() + LogicToPixel( Size( 3, 0 ), MapMode( MapUnit::MapAppFont ) ).Width() );
|
||||
m_pMtfTolerance->SetPosPixel( aPos );
|
||||
m_pMtfTolerance->SetValue( 10 );
|
||||
|
||||
SetMinOutputSizePixel( GetOutputSizePixel() );
|
||||
|
||||
m_pStbStatus->InsertItem( 1, 130, StatusBarItemBits::Left | StatusBarItemBits::In | StatusBarItemBits::AutoSize );
|
||||
m_pStbStatus->InsertItem( 2, 10 + GetTextWidth( " 9999,99 cm / 9999,99 cm " ) );
|
||||
m_pStbStatus->InsertItem( 3, 10 + GetTextWidth( " 9999,99 cm x 9999,99 cm " ) );
|
||||
m_pStbStatus->InsertItem( 4, 20 );
|
||||
|
||||
Resize();
|
||||
m_xMtfTolerance->set_value(10, FieldUnit::PERCENT);
|
||||
|
||||
aUpdateIdle.SetInvokeHandler( LINK( this, SvxSuperContourDlg, UpdateHdl ) );
|
||||
|
||||
@@ -297,30 +239,17 @@ SvxSuperContourDlg::SvxSuperContourDlg(SfxBindings *_pBindings, SfxChildWindow *
|
||||
|
||||
SvxSuperContourDlg::~SvxSuperContourDlg()
|
||||
{
|
||||
disposeOnce();
|
||||
m_xContourWnd->SetUpdateLink( Link<SvxGraphCtrl*,void>() );
|
||||
m_xContourWnd.reset();
|
||||
}
|
||||
|
||||
void SvxSuperContourDlg::dispose()
|
||||
{
|
||||
m_pContourWnd->SetUpdateLink( Link<GraphCtrl*,void>() );
|
||||
|
||||
SvtMiscOptions aMiscOptions;
|
||||
aMiscOptions.RemoveListenerLink( LINK(this, SvxSuperContourDlg, MiscHdl) );
|
||||
m_pContourWnd.disposeAndClear();
|
||||
m_pTbx1.clear();
|
||||
m_pMtfTolerance.clear();
|
||||
m_pStbStatus.clear();
|
||||
aContourItem.dispose();
|
||||
SvxContourDlg::dispose();
|
||||
}
|
||||
|
||||
bool SvxSuperContourDlg::Close()
|
||||
IMPL_LINK_NOARG(SvxSuperContourDlg, CancelHdl, weld::Button&, void)
|
||||
{
|
||||
bool bRet = true;
|
||||
|
||||
if (m_pTbx1->IsItemEnabled(mnApplyId))
|
||||
if (m_xTbx1->get_item_sensitive("TBI_APPLY"))
|
||||
{
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "svx/ui/querysavecontchangesdialog.ui"));
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querysavecontchangesdialog.ui"));
|
||||
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QuerySaveContourChangesDialog"));
|
||||
const short nRet = xQBox->run();
|
||||
|
||||
@@ -335,7 +264,8 @@ bool SvxSuperContourDlg::Close()
|
||||
bRet = false;
|
||||
}
|
||||
|
||||
return bRet && SfxFloatingWindow::Close();
|
||||
if (bRet)
|
||||
m_rDialog.response(RET_CANCEL);
|
||||
}
|
||||
|
||||
// Enabled or disabled all Controls
|
||||
@@ -350,12 +280,12 @@ void SvxSuperContourDlg::SetGraphic( const Graphic& rGraphic )
|
||||
aUndoGraphic = aRedoGraphic = Graphic();
|
||||
aGraphic = rGraphic;
|
||||
mnGrfChanged = 0;
|
||||
m_pContourWnd->SetGraphic( aGraphic );
|
||||
m_xContourWnd->SetGraphic( aGraphic );
|
||||
}
|
||||
|
||||
void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
|
||||
{
|
||||
DBG_ASSERT( m_pContourWnd->GetGraphic().GetType() != GraphicType::NONE, "Graphic must've been set first!" );
|
||||
DBG_ASSERT( m_xContourWnd->GetGraphic().GetType() != GraphicType::NONE, "Graphic must've been set first!" );
|
||||
|
||||
tools::PolyPolygon aPolyPoly( rPolyPoly );
|
||||
const MapMode aMap100( MapUnit::Map100thMM );
|
||||
@@ -378,13 +308,13 @@ void SvxSuperContourDlg::SetPolyPolygon( const tools::PolyPolygon& rPolyPoly )
|
||||
}
|
||||
}
|
||||
|
||||
m_pContourWnd->SetPolyPolygon( aPolyPoly );
|
||||
m_pContourWnd->GetSdrModel()->SetChanged();
|
||||
m_xContourWnd->SetPolyPolygon( aPolyPoly );
|
||||
m_xContourWnd->GetSdrModel()->SetChanged();
|
||||
}
|
||||
|
||||
tools::PolyPolygon SvxSuperContourDlg::GetPolyPolygon()
|
||||
{
|
||||
tools::PolyPolygon aRetPolyPoly( m_pContourWnd->GetPolyPolygon() );
|
||||
tools::PolyPolygon aRetPolyPoly( m_xContourWnd->GetPolyPolygon() );
|
||||
|
||||
const MapMode aMap100( MapUnit::Map100thMM );
|
||||
const MapMode aGrfMap( aGraphic.GetPrefMapMode() );
|
||||
@@ -426,115 +356,127 @@ void SvxSuperContourDlg::UpdateGraphic( const Graphic& rGraphic, bool _bGraphicL
|
||||
|
||||
// Click handler for ToolBox
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, Tbx1ClickHdl, ToolBox*, pTbx, void )
|
||||
IMPL_LINK(SvxSuperContourDlg, Tbx1ClickHdl, const OString&, rId, void)
|
||||
{
|
||||
sal_uInt16 nNewItemId = pTbx->GetCurItemId();
|
||||
|
||||
sal_uInt16 nId = pTbx->GetCurItemId();
|
||||
if (nId == mnApplyId)
|
||||
if (rId == "TBI_APPLY")
|
||||
{
|
||||
SfxBoolItem aBoolItem( SID_CONTOUR_EXEC, true );
|
||||
GetBindings().GetDispatcher()->ExecuteList(
|
||||
SID_CONTOUR_EXEC, SfxCallMode::ASYNCHRON | SfxCallMode::RECORD,
|
||||
{ &aBoolItem });
|
||||
}
|
||||
else if (nId == mnWorkSpaceId)
|
||||
else if (rId == "TBI_WORKPLACE")
|
||||
{
|
||||
if (m_pTbx1->IsItemChecked(mnWorkSpaceId))
|
||||
if (m_xTbx1->get_item_active("TBI_WORKPLACE"))
|
||||
{
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "svx/ui/querydeletecontourdialog.ui"));
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querydeletecontourdialog.ui"));
|
||||
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryDeleteContourDialog"));
|
||||
|
||||
if (!m_pContourWnd->IsContourChanged() || (xQBox->run() == RET_YES))
|
||||
m_pContourWnd->SetWorkplaceMode( true );
|
||||
if (!m_xContourWnd->IsContourChanged() || (xQBox->run() == RET_YES))
|
||||
m_xContourWnd->SetWorkplaceMode( true );
|
||||
else
|
||||
m_pTbx1->CheckItem(mnWorkSpaceId, false);
|
||||
m_xTbx1->set_item_active("TBI_WORKPLACE", false);
|
||||
}
|
||||
else
|
||||
m_pContourWnd->SetWorkplaceMode( false );
|
||||
m_xContourWnd->SetWorkplaceMode( false );
|
||||
}
|
||||
else if (nId == mnSelectId)
|
||||
else if (rId == "TBI_SELECT")
|
||||
{
|
||||
pTbx->CheckItem( nNewItemId );
|
||||
m_pContourWnd->SetEditMode( true );
|
||||
SetActiveTool(rId);
|
||||
m_xContourWnd->SetEditMode( true );
|
||||
}
|
||||
else if (nId == mnRectId)
|
||||
else if (rId == "TBI_RECT")
|
||||
{
|
||||
pTbx->CheckItem( nNewItemId );
|
||||
m_pContourWnd->SetObjKind( OBJ_RECT );
|
||||
SetActiveTool(rId);
|
||||
m_xContourWnd->SetObjKind( OBJ_RECT );
|
||||
}
|
||||
else if (nId == mnCircleId)
|
||||
else if (rId == "TBI_CIRCLE")
|
||||
{
|
||||
pTbx->CheckItem( nNewItemId );
|
||||
m_pContourWnd->SetObjKind( OBJ_CIRC );
|
||||
SetActiveTool(rId);
|
||||
m_xContourWnd->SetObjKind( OBJ_CIRC );
|
||||
}
|
||||
else if (nId == mnPolyId)
|
||||
else if (rId == "TBI_POLY")
|
||||
{
|
||||
pTbx->CheckItem( nNewItemId );
|
||||
m_pContourWnd->SetObjKind( OBJ_POLY );
|
||||
SetActiveTool(rId);
|
||||
m_xContourWnd->SetObjKind( OBJ_POLY );
|
||||
}
|
||||
else if (nId == mnPolyEditId)
|
||||
else if (rId == "TBI_POLYEDIT")
|
||||
{
|
||||
m_pContourWnd->SetPolyEditMode(pTbx->IsItemChecked(mnPolyEditId) ? SID_BEZIER_MOVE : 0);
|
||||
m_xContourWnd->SetPolyEditMode(m_xTbx1->get_item_active("TBI_POLYEDIT") ? SID_BEZIER_MOVE : 0);
|
||||
}
|
||||
else if (nId == mnPolyMoveId)
|
||||
else if (rId == "TBI_POLYMOVE")
|
||||
{
|
||||
m_pContourWnd->SetPolyEditMode( SID_BEZIER_MOVE );
|
||||
SetActivePoly(rId);
|
||||
m_xContourWnd->SetPolyEditMode( SID_BEZIER_MOVE );
|
||||
}
|
||||
else if (nId == mnPolyInsertId)
|
||||
else if (rId == "TBI_POLYINSERT")
|
||||
{
|
||||
m_pContourWnd->SetPolyEditMode( SID_BEZIER_INSERT );
|
||||
SetActivePoly(rId);
|
||||
m_xContourWnd->SetPolyEditMode( SID_BEZIER_INSERT );
|
||||
}
|
||||
else if (nId == mnPolyDeleteId)
|
||||
else if (rId == "TBI_POLYDELETE")
|
||||
{
|
||||
m_pContourWnd->GetSdrView()->DeleteMarkedPoints();
|
||||
m_xContourWnd->GetSdrView()->DeleteMarkedPoints();
|
||||
}
|
||||
else if (nId == mnUndoId)
|
||||
else if (rId == "TBI_UNDO")
|
||||
{
|
||||
mnGrfChanged = mnGrfChanged ? mnGrfChanged - 1 : 0;
|
||||
aRedoGraphic = aGraphic;
|
||||
aGraphic = aUndoGraphic;
|
||||
aUndoGraphic = Graphic();
|
||||
m_pContourWnd->SetGraphic( aGraphic, false );
|
||||
m_xContourWnd->SetGraphic( aGraphic, false );
|
||||
}
|
||||
else if (nId == mnRedoId)
|
||||
else if (rId == "TBI_REDO")
|
||||
{
|
||||
mnGrfChanged++;
|
||||
aUndoGraphic = aGraphic;
|
||||
aGraphic = aRedoGraphic;
|
||||
aRedoGraphic = Graphic();
|
||||
m_pContourWnd->SetGraphic( aGraphic, false );
|
||||
m_xContourWnd->SetGraphic( aGraphic, false );
|
||||
}
|
||||
else if (nId == mnAutoContourId)
|
||||
else if (rId == "TBI_AUTOCONTOUR")
|
||||
{
|
||||
aCreateIdle.Start();
|
||||
}
|
||||
else if (nId == mnPipetteId)
|
||||
else if (rId == "TBI_PIPETTE")
|
||||
{
|
||||
bool bPipette = m_pTbx1->IsItemChecked(mnPipetteId);
|
||||
bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE");
|
||||
|
||||
if ( !bPipette )
|
||||
m_pStbStatus->Invalidate();
|
||||
m_xStbStatusColor->Invalidate();
|
||||
else if ( bGraphicLinked )
|
||||
{
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "svx/ui/queryunlinkgraphicsdialog.ui"));
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/queryunlinkgraphicsdialog.ui"));
|
||||
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryUnlinkGraphicsDialog"));
|
||||
|
||||
if (xQBox->run() != RET_YES)
|
||||
{
|
||||
bPipette = false;
|
||||
m_pTbx1->CheckItem(mnPipetteId, bPipette);
|
||||
m_pStbStatus->Invalidate();
|
||||
m_xTbx1->set_item_active("TBI_PIPETTE", bPipette);
|
||||
m_xStbStatusColor->Invalidate();
|
||||
}
|
||||
}
|
||||
|
||||
m_pContourWnd->SetPipetteMode( bPipette );
|
||||
m_xContourWnd->SetPipetteMode( bPipette );
|
||||
}
|
||||
Invalidate();
|
||||
m_pContourWnd->QueueIdleUpdate();
|
||||
m_xContourWnd->QueueIdleUpdate();
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void )
|
||||
void SvxSuperContourDlg::SetActiveTool(const OString& rId)
|
||||
{
|
||||
m_xTbx1->set_item_active("TBI_SELECT", rId == "TBI_SELECT");
|
||||
m_xTbx1->set_item_active("TBI_RECT", rId == "TBI_RECT");
|
||||
m_xTbx1->set_item_active("TBI_CIRCLE", rId == "TBI_CIRCLE");
|
||||
m_xTbx1->set_item_active("TBI_POLY", rId == "TBI_POLY");
|
||||
}
|
||||
|
||||
void SvxSuperContourDlg::SetActivePoly(const OString& rId)
|
||||
{
|
||||
m_xTbx1->set_item_active("TBI_POLYMOVE", rId == "TBI_POLYMOVE");
|
||||
m_xTbx1->set_item_active("TBI_POLYINSERT", rId == "TBI_POLYINSERT");
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, MousePosHdl, SvxGraphCtrl*, pWnd, void )
|
||||
{
|
||||
OUString aStr;
|
||||
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
|
||||
@@ -546,10 +488,10 @@ IMPL_LINK( SvxSuperContourDlg, MousePosHdl, GraphCtrl*, pWnd, void )
|
||||
+ " / "
|
||||
+ GetUnitString( rMousePos.Y(), eFieldUnit, cSep );
|
||||
|
||||
m_pStbStatus->SetItemText( 2, aStr );
|
||||
m_xStbStatus2->set_label( aStr );
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, GraphCtrl*, pWnd, void )
|
||||
IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, SvxGraphCtrl*, pWnd, void )
|
||||
{
|
||||
OUString aStr;
|
||||
const FieldUnit eFieldUnit = GetBindings().GetDispatcher()->GetModule()->GetFieldUnit();
|
||||
@@ -561,7 +503,7 @@ IMPL_LINK( SvxSuperContourDlg, GraphSizeHdl, GraphCtrl*, pWnd, void )
|
||||
+ " x "
|
||||
+ GetUnitString( rSize.Height(), eFieldUnit, cSep );
|
||||
|
||||
m_pStbStatus->SetItemText( 3, aStr );
|
||||
m_xStbStatus3->set_label( aStr );
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl, Timer *, void)
|
||||
@@ -571,7 +513,7 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl, Timer *, void)
|
||||
if ( pUpdateEditingObject != pCheckObj )
|
||||
{
|
||||
if( !GetEditingObject() )
|
||||
m_pContourWnd->GrabFocus();
|
||||
m_xContourWnd->GrabFocus();
|
||||
|
||||
SetGraphic( aUpdateGraphic );
|
||||
SetPolyPolygon( aUpdatePolyPoly );
|
||||
@@ -582,101 +524,105 @@ IMPL_LINK_NOARG(SvxSuperContourDlg, UpdateHdl, Timer *, void)
|
||||
aUpdatePolyPoly = tools::PolyPolygon();
|
||||
bUpdateGraphicLinked = false;
|
||||
|
||||
m_pContourWnd->GetSdrModel()->SetChanged( false );
|
||||
m_xContourWnd->GetSdrModel()->SetChanged( false );
|
||||
}
|
||||
|
||||
GetBindings().Invalidate( SID_CONTOUR_EXEC );
|
||||
m_pContourWnd->QueueIdleUpdate();
|
||||
m_xContourWnd->QueueIdleUpdate();
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SvxSuperContourDlg, CreateHdl, Timer *, void)
|
||||
{
|
||||
aCreateIdle.Stop();
|
||||
|
||||
const tools::Rectangle aWorkRect = m_pContourWnd->LogicToPixel( m_pContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM ) );
|
||||
const Graphic& rGraphic = m_pContourWnd->GetGraphic();
|
||||
const tools::Rectangle aWorkRect = m_xContourWnd->GetDrawingArea()->get_ref_device().LogicToPixel(
|
||||
m_xContourWnd->GetWorkRect(), MapMode( MapUnit::Map100thMM));
|
||||
|
||||
const Graphic& rGraphic = m_xContourWnd->GetGraphic();
|
||||
const bool bValid = aWorkRect.Left() != aWorkRect.Right() && aWorkRect.Top() != aWorkRect.Bottom();
|
||||
|
||||
EnterWait();
|
||||
SetPolyPolygon( CreateAutoContour( rGraphic, bValid ? &aWorkRect : nullptr ) );
|
||||
LeaveWait();
|
||||
weld::WaitObject aWaitObj(&m_rDialog);
|
||||
SetPolyPolygon( SvxContourDlg::CreateAutoContour( rGraphic, bValid ? &aWorkRect : nullptr ) );
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, StateHdl, GraphCtrl*, pWnd, void )
|
||||
IMPL_LINK( SvxSuperContourDlg, StateHdl, SvxGraphCtrl*, pWnd, void )
|
||||
{
|
||||
const SdrObject* pObj = pWnd->GetSelectedSdrObject();
|
||||
const SdrView* pView = pWnd->GetSdrView();
|
||||
const bool bPolyEdit = ( pObj != nullptr ) && dynamic_cast<const SdrPathObj*>( pObj) != nullptr;
|
||||
const bool bDrawEnabled = !(bPolyEdit && m_pTbx1->IsItemChecked(mnPolyEditId));
|
||||
const bool bPipette = m_pTbx1->IsItemChecked(mnPipetteId);
|
||||
const bool bWorkplace = m_pTbx1->IsItemChecked(mnWorkSpaceId);
|
||||
const bool bDrawEnabled = !(bPolyEdit && m_xTbx1->get_item_active("TBI_POLYEDIT"));
|
||||
const bool bPipette = m_xTbx1->get_item_active("TBI_PIPETTE");
|
||||
const bool bWorkplace = m_xTbx1->get_item_active("TBI_WORKPLACE");
|
||||
const bool bDontHide = !( bPipette || bWorkplace );
|
||||
const bool bBitmap = pWnd->GetGraphic().GetType() == GraphicType::Bitmap;
|
||||
|
||||
m_pTbx1->EnableItem(mnApplyId, bDontHide && bExecState && pWnd->IsChanged());
|
||||
m_xTbx1->set_item_sensitive("TBI_APPLY", bDontHide && bExecState && pWnd->IsChanged());
|
||||
|
||||
m_pTbx1->EnableItem(mnWorkSpaceId, !bPipette && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_WORKPLACE", !bPipette && bDrawEnabled);
|
||||
|
||||
m_pTbx1->EnableItem(mnSelectId, bDontHide && bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnRectId, bDontHide && bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnCircleId, bDontHide && bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnPolyId, bDontHide && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_SELECT", bDontHide && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_RECT", bDontHide && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_CIRCLE", bDontHide && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_POLY", bDontHide && bDrawEnabled);
|
||||
|
||||
m_pTbx1->EnableItem(mnPolyEditId, bDontHide && bPolyEdit);
|
||||
m_pTbx1->EnableItem(mnPolyMoveId, bDontHide && !bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnPolyInsertId, bDontHide && !bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnPolyDeleteId, bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible());
|
||||
m_xTbx1->set_item_sensitive("TBI_POLYEDIT", bDontHide && bPolyEdit);
|
||||
m_xTbx1->set_item_sensitive("TBI_POLYMOVE", bDontHide && !bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_POLYINSERT", bDontHide && !bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_POLYDELETE", bDontHide && !bDrawEnabled && pView->IsDeleteMarkedPointsPossible());
|
||||
|
||||
m_pTbx1->EnableItem(mnAutoContourId, bDontHide && bDrawEnabled);
|
||||
m_pTbx1->EnableItem(mnPipetteId, !bWorkplace && bDrawEnabled && bBitmap);
|
||||
m_xTbx1->set_item_sensitive("TBI_AUTOCONTOUR", bDontHide && bDrawEnabled);
|
||||
m_xTbx1->set_item_sensitive("TBI_PIPETTE", !bWorkplace && bDrawEnabled && bBitmap);
|
||||
|
||||
m_pTbx1->EnableItem(mnUndoId, bDontHide && aUndoGraphic.GetType() != GraphicType::NONE);
|
||||
m_pTbx1->EnableItem(mnRedoId, bDontHide && aRedoGraphic.GetType() != GraphicType::NONE);
|
||||
m_xTbx1->set_item_sensitive("TBI_UNDO", bDontHide && aUndoGraphic.GetType() != GraphicType::NONE);
|
||||
m_xTbx1->set_item_sensitive("TBI_REDO", bDontHide && aRedoGraphic.GetType() != GraphicType::NONE);
|
||||
|
||||
if ( bPolyEdit )
|
||||
{
|
||||
sal_uInt16 nId = 0;
|
||||
|
||||
switch( pWnd->GetPolyEditMode() )
|
||||
{
|
||||
case SID_BEZIER_MOVE: nId = mnPolyMoveId; break;
|
||||
case SID_BEZIER_INSERT: nId = mnPolyInsertId; break;
|
||||
|
||||
case SID_BEZIER_MOVE:
|
||||
SetActivePoly("TBI_POLYMOVE");
|
||||
break;
|
||||
case SID_BEZIER_INSERT:
|
||||
SetActivePoly("TBI_POLYINSERT");
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
m_pTbx1->CheckItem( nId );
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pTbx1->CheckItem(mnPolyEditId, false);
|
||||
m_pTbx1->CheckItem(mnPolyMoveId);
|
||||
m_pTbx1->CheckItem(mnPolyInsertId, false);
|
||||
m_xTbx1->set_item_active("TBI_POLYEDIT", false);
|
||||
SetActivePoly("TBI_POLYMOVE");
|
||||
pWnd->SetPolyEditMode( 0 );
|
||||
}
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, PipetteHdl, ContourWindow&, rWnd, void )
|
||||
IMPL_LINK_NOARG(SvxSuperContourDlg, PipetteHdl, ContourWindow&, void)
|
||||
{
|
||||
const Color& rOldLineColor = m_pStbStatus->GetLineColor();
|
||||
const Color& rOldFillColor = m_pStbStatus->GetFillColor();
|
||||
m_xStbStatusColor->Invalidate();
|
||||
}
|
||||
|
||||
tools::Rectangle aRect( m_pStbStatus->GetItemRect( 4 ) );
|
||||
const Color& rColor = rWnd.GetPipetteColor();
|
||||
void StatusColor::Paint(vcl::RenderContext& rDevice, const tools::Rectangle&)
|
||||
{
|
||||
const Color& rOldLineColor = rDevice.GetLineColor();
|
||||
const Color& rOldFillColor = rDevice.GetFillColor();
|
||||
|
||||
m_pStbStatus->SetLineColor( rColor );
|
||||
m_pStbStatus->SetFillColor( rColor );
|
||||
tools::Rectangle aRect(Point(), GetOutputSizePixel());
|
||||
const Color& rColor = m_rWnd.GetPipetteColor();
|
||||
|
||||
rDevice.SetLineColor(rColor);
|
||||
rDevice.SetFillColor(rColor);
|
||||
|
||||
aRect.AdjustLeft(4 );
|
||||
aRect.AdjustTop(4 );
|
||||
aRect.AdjustRight( -4 );
|
||||
aRect.AdjustBottom( -4 );
|
||||
|
||||
m_pStbStatus->DrawRect( aRect );
|
||||
rDevice.DrawRect( aRect );
|
||||
|
||||
m_pStbStatus->SetLineColor( rOldLineColor );
|
||||
m_pStbStatus->SetFillColor( rOldFillColor );
|
||||
rDevice.SetLineColor(rOldLineColor);
|
||||
rDevice.SetFillColor(rOldFillColor);
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
|
||||
@@ -686,12 +632,12 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
|
||||
Bitmap aMask;
|
||||
const Color& rColor = rWnd.GetPipetteColor();
|
||||
|
||||
EnterWait();
|
||||
weld::WaitObject aWaitObj(&m_rDialog);
|
||||
|
||||
if( aGraphic.GetType() == GraphicType::Bitmap )
|
||||
{
|
||||
Bitmap aBmp( aGraphic.GetBitmapEx().GetBitmap() );
|
||||
const long nTol = static_cast<long>(m_pMtfTolerance->GetValue() * 255L / 100L);
|
||||
const long nTol = static_cast<long>(m_xMtfTolerance->get_value(FieldUnit::PERCENT) * 255L / 100L);
|
||||
|
||||
aMask = aBmp.CreateMask( rColor, nTol );
|
||||
|
||||
@@ -700,7 +646,7 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
|
||||
|
||||
if( !!aMask )
|
||||
{
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "svx/ui/querynewcontourdialog.ui"));
|
||||
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(&m_rDialog, "svx/ui/querynewcontourdialog.ui"));
|
||||
std::unique_ptr<weld::MessageDialog> xQBox(xBuilder->weld_message_dialog("QueryNewContourDialog"));
|
||||
|
||||
bool bNewContour;
|
||||
@@ -717,29 +663,20 @@ IMPL_LINK( SvxSuperContourDlg, PipetteClickHdl, ContourWindow&, rWnd, void )
|
||||
aCreateIdle.Start();
|
||||
}
|
||||
}
|
||||
|
||||
LeaveWait();
|
||||
}
|
||||
|
||||
m_pTbx1->CheckItem(mnPipetteId, false);
|
||||
m_xTbx1->set_item_active("TBI_PIPETTE", false);
|
||||
rWnd.SetPipetteMode( false );
|
||||
m_pStbStatus->Invalidate();
|
||||
m_xStbStatusColor->Invalidate();
|
||||
}
|
||||
|
||||
IMPL_LINK( SvxSuperContourDlg, WorkplaceClickHdl, ContourWindow&, rWnd, void )
|
||||
{
|
||||
m_pTbx1->CheckItem(mnWorkSpaceId, false);
|
||||
m_pTbx1->CheckItem(mnSelectId);
|
||||
m_xTbx1->set_item_active("TBI_WORKPLACE", false);
|
||||
m_xTbx1->set_item_active("TBI_SELECT", true);
|
||||
rWnd.SetWorkplaceMode( false );
|
||||
|
||||
m_pContourWnd->QueueIdleUpdate();
|
||||
Invalidate();
|
||||
}
|
||||
|
||||
IMPL_LINK_NOARG(SvxSuperContourDlg, MiscHdl, LinkParamNone*, void)
|
||||
{
|
||||
SvtMiscOptions aMiscOptions;
|
||||
m_pTbx1->SetOutStyle( aMiscOptions.GetToolboxStyle() );
|
||||
m_xContourWnd->QueueIdleUpdate();
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -21,8 +21,6 @@
|
||||
|
||||
#include <svx/contdlg.hxx>
|
||||
#include "contwnd.hxx"
|
||||
#include <vcl/toolbox.hxx>
|
||||
#include <vcl/status.hxx>
|
||||
#include <vcl/idle.hxx>
|
||||
|
||||
class SvxSuperContourDlg;
|
||||
@@ -40,63 +38,77 @@ public:
|
||||
SvxContourDlgItem( SvxSuperContourDlg& rDlg, SfxBindings& rBindings );
|
||||
};
|
||||
|
||||
class SvxSuperContourDlg : public SvxContourDlg
|
||||
{
|
||||
using SvxContourDlg::GetPolyPolygon;
|
||||
class ContourWindow;
|
||||
|
||||
class StatusColor : public weld::CustomWidgetController
|
||||
{
|
||||
private:
|
||||
ContourWindow& m_rWnd;
|
||||
public:
|
||||
StatusColor(ContourWindow& rWnd)
|
||||
: m_rWnd(rWnd)
|
||||
{
|
||||
}
|
||||
virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
|
||||
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override
|
||||
{
|
||||
weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
|
||||
Size aSize(pDrawingArea->get_approximate_digit_width() * 3,
|
||||
pDrawingArea->get_text_height());
|
||||
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
|
||||
SetOutputSizePixel(aSize);
|
||||
}
|
||||
};
|
||||
|
||||
class SvxSuperContourDlg
|
||||
{
|
||||
Graphic aGraphic;
|
||||
Graphic aUndoGraphic;
|
||||
Graphic aRedoGraphic;
|
||||
Graphic aUpdateGraphic;
|
||||
tools::PolyPolygon aUpdatePolyPoly;
|
||||
tools::PolyPolygon aUpdatePolyPoly;
|
||||
Idle aUpdateIdle;
|
||||
Idle aCreateIdle;
|
||||
SfxBindings* mpBindings;
|
||||
void* pUpdateEditingObject;
|
||||
void* pCheckObj;
|
||||
SvxContourDlgItem aContourItem;
|
||||
VclPtr<ToolBox> m_pTbx1;
|
||||
VclPtr<MetricField> m_pMtfTolerance;
|
||||
VclPtr<ContourWindow> m_pContourWnd;
|
||||
VclPtr<StatusBar> m_pStbStatus;
|
||||
sal_Int32 mnGrfChanged;
|
||||
bool bExecState;
|
||||
bool bUpdateGraphicLinked;
|
||||
bool bGraphicLinked;
|
||||
|
||||
sal_uInt16 mnApplyId;
|
||||
sal_uInt16 mnWorkSpaceId;
|
||||
sal_uInt16 mnSelectId;
|
||||
sal_uInt16 mnRectId;
|
||||
sal_uInt16 mnCircleId;
|
||||
sal_uInt16 mnPolyId;
|
||||
sal_uInt16 mnPolyEditId;
|
||||
sal_uInt16 mnPolyMoveId;
|
||||
sal_uInt16 mnPolyInsertId;
|
||||
sal_uInt16 mnPolyDeleteId;
|
||||
sal_uInt16 mnAutoContourId;
|
||||
sal_uInt16 mnUndoId;
|
||||
sal_uInt16 mnRedoId;
|
||||
sal_uInt16 mnPipetteId;
|
||||
weld::Dialog& m_rDialog;
|
||||
std::unique_ptr<ContourWindow> m_xContourWnd;
|
||||
std::unique_ptr<StatusColor> m_xStbStatusColor;
|
||||
std::unique_ptr<weld::Toolbar> m_xTbx1;
|
||||
std::unique_ptr<weld::MetricSpinButton> m_xMtfTolerance;
|
||||
std::unique_ptr<weld::Label> m_xStbStatus2;
|
||||
std::unique_ptr<weld::Label> m_xStbStatus3;
|
||||
std::unique_ptr<weld::Button> m_xCancelBtn;
|
||||
std::unique_ptr<weld::CustomWeld> m_xStbStatusColorWeld;
|
||||
std::unique_ptr<weld::CustomWeld> m_xContourWndWeld;
|
||||
|
||||
virtual bool Close() override;
|
||||
DECL_LINK( Tbx1ClickHdl, const OString&, void );
|
||||
DECL_LINK( MousePosHdl, SvxGraphCtrl*, void );
|
||||
DECL_LINK( GraphSizeHdl, SvxGraphCtrl*, void );
|
||||
DECL_LINK( UpdateHdl, Timer *, void );
|
||||
DECL_LINK( CreateHdl, Timer *, void );
|
||||
DECL_LINK( StateHdl, SvxGraphCtrl*, void );
|
||||
DECL_LINK( PipetteHdl, ContourWindow&, void );
|
||||
DECL_LINK( PipetteClickHdl, ContourWindow&, void );
|
||||
DECL_LINK( WorkplaceClickHdl, ContourWindow&, void );
|
||||
DECL_LINK( CancelHdl, weld::Button&, void );
|
||||
|
||||
DECL_LINK( Tbx1ClickHdl, ToolBox*, void );
|
||||
DECL_LINK( MousePosHdl, GraphCtrl*, void );
|
||||
DECL_LINK( GraphSizeHdl, GraphCtrl*, void );
|
||||
DECL_LINK( UpdateHdl, Timer *, void );
|
||||
DECL_LINK( CreateHdl, Timer *, void );
|
||||
DECL_LINK( StateHdl, GraphCtrl*, void );
|
||||
DECL_LINK( PipetteHdl, ContourWindow&, void );
|
||||
DECL_LINK( PipetteClickHdl, ContourWindow&, void );
|
||||
DECL_LINK( WorkplaceClickHdl, ContourWindow&, void );
|
||||
DECL_LINK( MiscHdl, LinkParamNone*, void );
|
||||
void SetActiveTool(const OString& rId);
|
||||
void SetActivePoly(const OString& rId);
|
||||
|
||||
SfxBindings& GetBindings() { return *mpBindings; }
|
||||
|
||||
public:
|
||||
|
||||
SvxSuperContourDlg(SfxBindings *pBindings, SfxChildWindow *pCW,
|
||||
vcl::Window* pParent);
|
||||
virtual ~SvxSuperContourDlg() override;
|
||||
virtual void dispose() override;
|
||||
SvxSuperContourDlg(weld::Builder& rBuilder, weld::Dialog& rDialog, SfxBindings* pBindings);
|
||||
~SvxSuperContourDlg();
|
||||
|
||||
void SetExecState( bool bEnable );
|
||||
|
||||
|
||||
@@ -33,14 +33,13 @@ using namespace css;
|
||||
|
||||
#define TRANSCOL COL_WHITE
|
||||
|
||||
ContourWindow::ContourWindow(vcl::Window* pParent, WinBits nBits)
|
||||
: GraphCtrl (pParent, nBits)
|
||||
ContourWindow::ContourWindow(weld::Dialog* pDialog)
|
||||
: SvxGraphCtrl(pDialog)
|
||||
, aWorkRect(0, 0, 0, 0)
|
||||
, bPipetteMode(false)
|
||||
, bWorkplaceMode(false)
|
||||
, bClickValid(false)
|
||||
{
|
||||
SetSdrMode(true);
|
||||
}
|
||||
|
||||
void ContourWindow::SetPolyPolygon(const tools::PolyPolygon& rPolyPoly)
|
||||
@@ -112,7 +111,7 @@ const tools::PolyPolygon& ContourWindow::GetPolyPolygon()
|
||||
|
||||
void ContourWindow::InitSdrModel()
|
||||
{
|
||||
GraphCtrl::InitSdrModel();
|
||||
SvxGraphCtrl::InitSdrModel();
|
||||
|
||||
SfxItemSet aSet( pModel->GetItemPool() );
|
||||
|
||||
@@ -139,11 +138,11 @@ bool ContourWindow::IsContourChanged() const
|
||||
return bRet;
|
||||
}
|
||||
|
||||
void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
bool ContourWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
{
|
||||
if ( bWorkplaceMode )
|
||||
{
|
||||
const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
const Point aLogPt(GetDrawingArea()->get_ref_device().PixelToLogic(rMEvt.GetPosPixel()));
|
||||
|
||||
SetPolyPolygon( tools::PolyPolygon() );
|
||||
aWorkRect = tools::Rectangle( aLogPt, aLogPt );
|
||||
@@ -151,48 +150,54 @@ void ContourWindow::MouseButtonDown( const MouseEvent& rMEvt )
|
||||
SetEditMode( true );
|
||||
}
|
||||
|
||||
if ( !bPipetteMode )
|
||||
GraphCtrl::MouseButtonDown( rMEvt );
|
||||
if (!bPipetteMode)
|
||||
return SvxGraphCtrl::MouseButtonDown( rMEvt );
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
void ContourWindow::MouseMove( const MouseEvent& rMEvt )
|
||||
bool ContourWindow::MouseMove( const MouseEvent& rMEvt )
|
||||
{
|
||||
bClickValid = false;
|
||||
|
||||
if ( bPipetteMode )
|
||||
{
|
||||
const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
const Point aLogPt( GetDrawingArea()->get_ref_device().PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
|
||||
aPipetteColor = GetPixel( aLogPt );
|
||||
Control::MouseMove( rMEvt );
|
||||
aPipetteColor = GetDrawingArea()->get_ref_device().GetPixel( aLogPt );
|
||||
weld::CustomWidgetController::MouseMove( rMEvt );
|
||||
|
||||
if ( aPipetteLink.IsSet() && tools::Rectangle( Point(), GetGraphicSize() ).IsInside( aLogPt ) )
|
||||
{
|
||||
SetPointer( PointerStyle::RefHand );
|
||||
aPipetteLink.Call( *this );
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
GraphCtrl::MouseMove( rMEvt );
|
||||
|
||||
return SvxGraphCtrl::MouseMove( rMEvt );
|
||||
}
|
||||
|
||||
void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
bool ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
{
|
||||
const tools::Rectangle aGraphRect( Point(), GetGraphicSize() );
|
||||
const Point aLogPt( PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
const Point aLogPt( GetDrawingArea()->get_ref_device().PixelToLogic( rMEvt.GetPosPixel() ) );
|
||||
|
||||
bClickValid = aGraphRect.IsInside( aLogPt );
|
||||
ReleaseMouse();
|
||||
|
||||
if ( bPipetteMode )
|
||||
{
|
||||
Control::MouseButtonUp( rMEvt );
|
||||
weld::CustomWidgetController::MouseButtonUp( rMEvt );
|
||||
|
||||
aPipetteClickLink.Call( *this );
|
||||
|
||||
return true;
|
||||
}
|
||||
else if ( bWorkplaceMode )
|
||||
{
|
||||
GraphCtrl::MouseButtonUp( rMEvt );
|
||||
SvxGraphCtrl::MouseButtonUp( rMEvt );
|
||||
|
||||
aWorkRect.SetRight( aLogPt.X() );
|
||||
aWorkRect.SetBottom( aLogPt.Y() );
|
||||
@@ -213,9 +218,11 @@ void ContourWindow::MouseButtonUp(const MouseEvent& rMEvt)
|
||||
Invalidate( aGraphRect );
|
||||
|
||||
aWorkplaceClickLink.Call( *this );
|
||||
|
||||
return false;
|
||||
}
|
||||
else
|
||||
GraphCtrl::MouseButtonUp( rMEvt );
|
||||
|
||||
return SvxGraphCtrl::MouseButtonUp( rMEvt );
|
||||
}
|
||||
|
||||
void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
|
||||
@@ -224,6 +231,7 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
|
||||
// encapsulate the redraw using Begin/End and use the returned
|
||||
// data to get the target output device (e.g. when pre-rendering)
|
||||
SdrPaintWindow* pPaintWindow = pView->BeginCompleteRedraw(&rRenderContext);
|
||||
pPaintWindow->SetOutputToWindow(true);
|
||||
OutputDevice& rTarget = pPaintWindow->GetTargetOutputDevice();
|
||||
|
||||
const Graphic& rGraphic = GetGraphic();
|
||||
@@ -253,9 +261,13 @@ void ContourWindow::Paint(vcl::RenderContext& rRenderContext, const tools::Recta
|
||||
pView->EndCompleteRedraw(*pPaintWindow, true);
|
||||
}
|
||||
|
||||
Size ContourWindow::GetOptimalSize() const
|
||||
void ContourWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
|
||||
{
|
||||
return LogicToPixel(Size(270, 170), MapMode(MapUnit::MapAppFont));
|
||||
SvxGraphCtrl::SetDrawingArea(pDrawingArea);
|
||||
Size aSize(pDrawingArea->get_ref_device().LogicToPixel(Size(270, 170), MapMode(MapUnit::MapAppFont)));
|
||||
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
|
||||
SetOutputSizePixel(aSize);
|
||||
SetSdrMode(true);
|
||||
}
|
||||
|
||||
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
#include <tools/poly.hxx>
|
||||
#include <svx/graphctl.hxx>
|
||||
|
||||
class ContourWindow : public GraphCtrl
|
||||
class ContourWindow final : public SvxGraphCtrl
|
||||
{
|
||||
tools::PolyPolygon aPolyPoly;
|
||||
Color aPipetteColor;
|
||||
@@ -35,19 +35,17 @@ class ContourWindow : public GraphCtrl
|
||||
bool bWorkplaceMode;
|
||||
bool bClickValid;
|
||||
|
||||
protected:
|
||||
|
||||
virtual void MouseButtonDown(const MouseEvent& rMEvt) override;
|
||||
virtual void MouseMove(const MouseEvent& rMEvt) override;
|
||||
virtual void MouseButtonUp(const MouseEvent& rMEvt) override;
|
||||
virtual bool MouseButtonDown(const MouseEvent& rMEvt) override;
|
||||
virtual bool MouseMove(const MouseEvent& rMEvt) override;
|
||||
virtual bool MouseButtonUp(const MouseEvent& rMEvt) override;
|
||||
virtual void SdrObjCreated( const SdrObject& rObj ) override;
|
||||
virtual void InitSdrModel() override;
|
||||
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
|
||||
virtual Size GetOptimalSize() const override;
|
||||
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) override;
|
||||
|
||||
public:
|
||||
|
||||
ContourWindow(vcl::Window* pParent, WinBits nBits);
|
||||
ContourWindow(weld::Dialog* pDialog);
|
||||
|
||||
void SetPolyPolygon( const tools::PolyPolygon& rPolyPoly );
|
||||
const tools::PolyPolygon& GetPolyPolygon();
|
||||
|
||||
@@ -107,8 +107,6 @@ void SvxIMapDlgChildWindow::UpdateIMapDlg( const Graphic& rGraphic, const ImageM
|
||||
pDlg->UpdateLink(rGraphic, pImageMap, pTargetList, pEditingObj);
|
||||
}
|
||||
|
||||
VCL_BUILDER_FACTORY(StatusBar)
|
||||
|
||||
SvxIMapDlg::SvxIMapDlg(SfxBindings *_pBindings, SfxChildWindow *pCW, weld::Window* _pParent)
|
||||
: SfxModelessDialogController(_pBindings, pCW, _pParent, "svx/ui/imapdialog.ui", "ImapDialog")
|
||||
, pCheckObj(nullptr)
|
||||
@@ -707,18 +705,19 @@ IMPL_LINK( SvxIMapDlg, StateHdl, SvxGraphCtrl*, pWnd, void )
|
||||
|
||||
if ( bPolyEdit )
|
||||
{
|
||||
OString sId;
|
||||
|
||||
switch( pWnd->GetPolyEditMode() )
|
||||
{
|
||||
case SID_BEZIER_MOVE: sId = "TBI_POLYMOVE"; break;
|
||||
case SID_BEZIER_INSERT: sId = "TBI_POLYINSERT"; break;
|
||||
|
||||
case SID_BEZIER_MOVE:
|
||||
m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", true);
|
||||
m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", false);
|
||||
break;
|
||||
case SID_BEZIER_INSERT:
|
||||
m_xTbxIMapDlg1->set_item_active("TBI_POLYINSERT", true);
|
||||
m_xTbxIMapDlg1->set_item_active("TBI_POLYMOVE", false);
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
break;
|
||||
}
|
||||
|
||||
m_xTbxIMapDlg1->set_item_active(sId, true);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+361
-249
@@ -1,7 +1,6 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!-- Generated with glade 3.16.1 -->
|
||||
<!-- Generated with glade 3.22.1 -->
|
||||
<interface domain="svx">
|
||||
<requires lib="LibreOffice" version="1.0"/>
|
||||
<requires lib="gtk+" version="3.18"/>
|
||||
<object class="GtkAdjustment" id="adjustment1">
|
||||
<property name="upper">99</property>
|
||||
@@ -9,339 +8,452 @@
|
||||
<property name="step_increment">1</property>
|
||||
<property name="page_increment">10</property>
|
||||
</object>
|
||||
<object class="GtkWindow" id="FloatingContour">
|
||||
<object class="GtkDialog" id="FloatingContour">
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="border_width">6</property>
|
||||
<property name="title" translatable="yes" context="floatingcontour|FloatingContour">Contour Editor</property>
|
||||
<property name="default_width">0</property>
|
||||
<property name="default_height">0</property>
|
||||
<property name="type_hint">dialog</property>
|
||||
<child>
|
||||
<object class="GtkBox" id="mainbox">
|
||||
<placeholder/>
|
||||
</child>
|
||||
<child internal-child="vbox">
|
||||
<object class="GtkBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<child internal-child="action_area">
|
||||
<object class="GtkButtonBox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<property name="layout_style">end</property>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="toolbar">
|
||||
<object class="GtkStatusbar" id="statusbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">end</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="toolbar_style">icons</property>
|
||||
<property name="spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_APPLY">
|
||||
<object class="GtkDrawingArea" id="statuscolor">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_APPLY</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_APPLY">Apply</property>
|
||||
<property name="icon_name">svx/res/cd01.png</property>
|
||||
<property name="tooltip_text" translatable="yes" context="floatingcontour|statuscolor">Color</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem1">
|
||||
<object class="GtkSeparator" id="separator1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_WORKPLACE">
|
||||
<object class="GtkLabel" id="statussize">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_WORKPLACE</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_WORKPLACE">Workspace</property>
|
||||
<property name="icon_name">svx/res/cd02.png</property>
|
||||
<property name="label">100%</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem2">
|
||||
<object class="GtkSeparator" id="separator4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="orientation">vertical</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">3</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_SELECT">
|
||||
<object class="GtkLabel" id="statuspos">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_SELECT</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_SELECT">Select</property>
|
||||
<property name="icon_name">svx/res/cd05.png</property>
|
||||
<property name="label">100%</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_RECT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_RECT</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_RECT">Rectangle</property>
|
||||
<property name="icon_name">svx/res/cd06.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_CIRCLE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_CIRCLE</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_CIRCLE">Ellipse</property>
|
||||
<property name="icon_name">svx/res/cd07.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLY">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_POLY</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLY">Polygon</property>
|
||||
<property name="icon_name">svx/res/cd08.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLYEDIT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_POLYEDIT</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYEDIT">Edit Points</property>
|
||||
<property name="icon_name">svx/res/cd015.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLYMOVE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_POLYMOVE</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYMOVE">Move Points</property>
|
||||
<property name="icon_name">svx/res/cd016.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLYINSERT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_POLYINSERT</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYINSERT">Insert Points</property>
|
||||
<property name="icon_name">svx/res/cd017.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLYDELETE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_POLYDELETE</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYDELETE">Delete Points</property>
|
||||
<property name="icon_name">svx/res/cd018.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_AUTOCONTOUR">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="action_name">TBI_AUTOCONTOUR</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_AUTOCONTOUR">AutoContour</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon_name">svx/res/cd025.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_UNDO">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_UNDO</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_UNDO">Undo </property>
|
||||
<property name="icon_name">svx/res/cd020.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_REDO">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_REDO</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_REDO">Redo</property>
|
||||
<property name="icon_name">svx/res/cd021.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_PIPETTE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="action_name">TBI_PIPETTE</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_PIPETTE">Pipette</property>
|
||||
<property name="icon_name">svx/res/cd026.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
<property name="fill">False</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">4</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton:0%">
|
||||
<property name="visible">True</property>
|
||||
<object class="GtkButton" id="cancel">
|
||||
<property name="label">gtk-cancel</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes" context="floatingcontour|spinbutton|tooltip_text">Color Tolerance</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
<property name="receives_default">True</property>
|
||||
<property name="use_stock">True</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="pack_type">end</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkBox" id="container">
|
||||
<object class="GtkBox" id="mainbox">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">6</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="svxlo-StatusBar" id="statusbar">
|
||||
<property name="height_request">25</property>
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="orientation">vertical</property>
|
||||
<property name="spacing">2</property>
|
||||
<child>
|
||||
<object class="GtkGrid" id="grid1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="column_spacing">12</property>
|
||||
<child>
|
||||
<object class="GtkToolbar" id="toolbar">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="toolbar_style">icons</property>
|
||||
<property name="show_arrow">False</property>
|
||||
<property name="icon_size">2</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_APPLY">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_APPLY">Apply</property>
|
||||
<property name="icon_name">svx/res/cd01.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem1">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_WORKPLACE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_WORKPLACE">Workspace</property>
|
||||
<property name="icon_name">svx/res/cd02.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem2">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_SELECT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_SELECT">Select</property>
|
||||
<property name="icon_name">svx/res/cd05.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_RECT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_RECT">Rectangle</property>
|
||||
<property name="icon_name">svx/res/cd06.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_CIRCLE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_CIRCLE">Ellipse</property>
|
||||
<property name="icon_name">svx/res/cd07.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_POLY">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLY">Polygon</property>
|
||||
<property name="icon_name">svx/res/cd08.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem3">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_POLYEDIT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYEDIT">Edit Points</property>
|
||||
<property name="icon_name">svx/res/cd015.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_POLYMOVE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYMOVE">Move Points</property>
|
||||
<property name="icon_name">svx/res/cd016.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_POLYINSERT">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYINSERT">Insert Points</property>
|
||||
<property name="icon_name">svx/res/cd017.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_POLYDELETE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_POLYDELETE">Delete Points</property>
|
||||
<property name="icon_name">svx/res/cd018.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem4">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_AUTOCONTOUR">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_AUTOCONTOUR">AutoContour</property>
|
||||
<property name="use_underline">True</property>
|
||||
<property name="icon_name">svx/res/cd025.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSeparatorToolItem" id="separatortoolitem5">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">False</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_UNDO">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_UNDO">Undo </property>
|
||||
<property name="icon_name">svx/res/cd020.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_REDO">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_REDO">Redo</property>
|
||||
<property name="icon_name">svx/res/cd021.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkToggleToolButton" id="TBI_PIPETTE">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="label" translatable="yes" context="floatingcontour|TBI_PIPETTE">Pipette</property>
|
||||
<property name="icon_name">svx/res/cd026.png</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="homogeneous">True</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">0</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkSpinButton" id="spinbutton">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="tooltip_text" translatable="yes" context="floatingcontour|spinbutton|tooltip_text">Color Tolerance</property>
|
||||
<property name="adjustment">adjustment1</property>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">0</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkScrolledWindow">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<property name="hscrollbar_policy">never</property>
|
||||
<property name="vscrollbar_policy">never</property>
|
||||
<property name="shadow_type">in</property>
|
||||
<child>
|
||||
<object class="GtkViewport">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
<child>
|
||||
<object class="GtkDrawingArea" id="container">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">True</property>
|
||||
<property name="events">GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_STRUCTURE_MASK</property>
|
||||
<property name="hexpand">True</property>
|
||||
<property name="vexpand">True</property>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">True</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">2</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="expand">False</property>
|
||||
<property name="fill">True</property>
|
||||
<property name="position">3</property>
|
||||
<property name="position">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
</object>
|
||||
</child>
|
||||
<action-widgets>
|
||||
<action-widget response="-6">cancel</action-widget>
|
||||
</action-widgets>
|
||||
</object>
|
||||
</interface>
|
||||
|
||||
@@ -139,7 +139,7 @@
|
||||
<property name="hexpand">True</property>
|
||||
<property name="toolbar_style">icons</property>
|
||||
<property name="show_arrow">False</property>
|
||||
<property name="icon_size">1</property>
|
||||
<property name="icon_size">2</property>
|
||||
<child>
|
||||
<object class="GtkToolButton" id="TBI_APPLY">
|
||||
<property name="visible">True</property>
|
||||
|
||||
@@ -137,10 +137,8 @@ namespace
|
||||
{
|
||||
SvxContourDlg* GetContourDlg(SwView const &rView)
|
||||
{
|
||||
SfxChildWindow *pChildWindow = rView.GetViewFrame()->GetChildWindow(
|
||||
SvxContourDlgChildWindow::GetChildWindowId());
|
||||
|
||||
return pChildWindow ? static_cast<SvxContourDlg*>(pChildWindow->GetWindow()) : nullptr;
|
||||
SfxChildWindow *pWnd = rView.GetViewFrame()->GetChildWindow(SvxContourDlgChildWindow::GetChildWindowId());
|
||||
return pWnd ? static_cast<SvxContourDlg*>(pWnd->GetController().get()) : nullptr;
|
||||
}
|
||||
|
||||
SvxIMapDlg* GetIMapDlg(SwView const &rView)
|
||||
|
||||
@@ -5353,9 +5353,12 @@ private:
|
||||
|
||||
static void collect(GtkWidget* pItem, gpointer widget)
|
||||
{
|
||||
GtkToolButton* pToolItem = GTK_TOOL_BUTTON(pItem);
|
||||
GtkInstanceToolbar* pThis = static_cast<GtkInstanceToolbar*>(widget);
|
||||
pThis->add_to_map(pToolItem);
|
||||
if (GTK_IS_TOOL_BUTTON(pItem))
|
||||
{
|
||||
GtkToolButton* pToolItem = GTK_TOOL_BUTTON(pItem);
|
||||
GtkInstanceToolbar* pThis = static_cast<GtkInstanceToolbar*>(widget);
|
||||
pThis->add_to_map(pToolItem);
|
||||
}
|
||||
}
|
||||
|
||||
void add_to_map(GtkToolButton* pToolItem)
|
||||
|
||||
Reference in New Issue
Block a user