Kaydet (Commit) 79daf40e authored tarafından Caolán McNamara's avatar Caolán McNamara

weld SvxAreaTabPage

which itself has 5 sub tab pages

Change-Id: If71e91248b5771af4845ad6dba997ac4c7841b5d
Reviewed-on: https://gerrit.libreoffice.org/56112
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst b0949210
......@@ -66,8 +66,7 @@ $(eval $(call gb_Helper_register_executables,NONE, \
svdemo \
fftester \
svptest \
svpclient \
pixelctl ) \
svpclient ) \
$(if $(filter LINUX %BSD SOLARIS,$(OS)), tilebench) \
$(if $(filter LINUX MACOSX SOLARIS WNT %BSD,$(OS)),icontest \
outdevgrind) \
......
......@@ -144,12 +144,12 @@ private:
class SvxBkgTabPage : public SvxAreaTabPage
{
VclPtr<ListBox> m_pTblLBox;
std::unique_ptr<weld::ComboBoxText> m_xTblLBox;
bool bHighlighting : 1;
public:
using SvxAreaTabPage::DeactivatePage;
SvxBkgTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs );
SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs);
virtual ~SvxBkgTabPage() override;
virtual void dispose() override;
......
This diff is collapsed.
......@@ -1443,16 +1443,14 @@ void SvxBackgroundTabPage::PageCreated(const SfxAllItemSet& aSet)
}
}
SvxBkgTabPage::SvxBkgTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ) :
SvxAreaTabPage( pParent, rInAttrs ),
m_pTblLBox(nullptr),
bHighlighting(false)
SvxBkgTabPage::SvxBkgTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
: SvxAreaTabPage(pParent, rInAttrs)
, bHighlighting(false)
{
VclPtr<vcl::Window> pBtn;
get(pBtn, "btngradient"); pBtn->Hide();
get(pBtn, "btnhatch"); pBtn->Hide();
get(pBtn, "btnbitmap"); pBtn->Hide();
get(pBtn, "btnpattern"); pBtn->Hide();
m_xBtnGradient->hide();
m_xBtnHatch->hide();
m_xBtnBitmap->hide();
m_xBtnPattern->hide();
SfxObjectShell* pDocSh = SfxObjectShell::Current();
const SfxPoolItem* pItem = nullptr;
......@@ -1483,7 +1481,7 @@ SvxBkgTabPage::~SvxBkgTabPage()
void SvxBkgTabPage::dispose()
{
m_pTblLBox.clear();
m_xTblLBox.reset();
SvxAreaTabPage::dispose();
}
......@@ -1501,9 +1499,9 @@ DeactivateRC SvxBkgTabPage::DeactivatePage( SfxItemSet* _pSet )
bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
{
sal_uInt16 nSlot = SID_ATTR_BRUSH;
if ( m_pTblLBox && m_pTblLBox->IsVisible() )
if (m_xTblLBox && m_xTblLBox->get_visible())
{
switch( m_pTblLBox->GetSelectedEntryPos() )
switch (m_xTblLBox->get_active())
{
case TBL_DEST_CELL:
nSlot = SID_ATTR_BRUSH;
......@@ -1549,10 +1547,9 @@ bool SvxBkgTabPage::FillItemSet( SfxItemSet* rCoreSet )
return true;
}
VclPtr<SfxTabPage> SvxBkgTabPage::Create( TabPageParent pWindow,
const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxBkgTabPage::Create(TabPageParent pWindow, const SfxItemSet* rAttrs)
{
return VclPtr<SvxBkgTabPage>::Create( pWindow.pParent, *rAttrs );
return VclPtr<SvxBkgTabPage>::Create(pWindow, *rAttrs);
}
void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet)
......@@ -1563,21 +1560,15 @@ void SvxBkgTabPage::PageCreated(const SfxAllItemSet& aSet)
SvxBackgroundTabFlags nFlags = static_cast<SvxBackgroundTabFlags>(pFlagItem->GetValue());
if ( nFlags & SvxBackgroundTabFlags::SHOW_TBLCTL )
{
VclPtr<vcl::Window> pBtn;
get(pBtn, "btnbitmap");
pBtn->Show();
get(m_pTblLBox, "tablelb");
m_pTblLBox->SelectEntryPos(0);
m_pTblLBox->Show();
m_xBtnBitmap->show();
m_xTblLBox = m_xBuilder->weld_combo_box_text("tablelb");
m_xTblLBox->set_active(0);
m_xTblLBox->show();
}
else if (nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING)
bHighlighting = bool(nFlags & SvxBackgroundTabFlags::SHOW_HIGHLIGHTING);
else if (nFlags & SvxBackgroundTabFlags::SHOW_SELECTOR)
{
VclPtr<vcl::Window> pBtn;
get(pBtn, "btnbitmap");
pBtn->Show();
}
m_xBtnBitmap->show();
}
SvxAreaTabPage::PageCreated( aSet );
}
......
......@@ -82,72 +82,64 @@ void lclExtendSize(Size& rSize, const Size& rInputSize)
|*
\************************************************************************/
SvxAreaTabPage::SvxAreaTabPage( vcl::Window* pParent, const SfxItemSet& rInAttrs ) :
SvxTabPage( pParent,
"AreaTabPage",
"cui/ui/areatabpage.ui",
rInAttrs ),
m_pFillTabPage( nullptr ),
m_pColorList( nullptr ),
m_pGradientList( nullptr ),
m_pHatchingList( nullptr ),
m_pBitmapList( nullptr ),
m_pPatternList( nullptr ),
SvxAreaTabPage::SvxAreaTabPage(TabPageParent pParent, const SfxItemSet& rInAttrs)
: SvxTabPage(pParent, "cui/ui/areatabpage.ui", "AreaTabPage", rInAttrs)
, m_pFillTabPage(nullptr)
, m_pColorList(nullptr)
, m_pGradientList(nullptr)
, m_pHatchingList(nullptr)
, m_pBitmapList(nullptr)
, m_pPatternList(nullptr)
// local fixed not o be changed values for local pointers
maFixed_ChangeType(ChangeType::NONE),
, maFixed_ChangeType(ChangeType::NONE)
// init with pointers to fixed ChangeType
m_pnColorListState(&maFixed_ChangeType),
m_pnBitmapListState(&maFixed_ChangeType),
m_pnPatternListState(&maFixed_ChangeType),
m_pnGradientListState(&maFixed_ChangeType),
m_pnHatchingListState(&maFixed_ChangeType),
m_aXFillAttr ( rInAttrs.GetPool() ),
m_rXFSet ( m_aXFillAttr.GetItemSet() )
, m_pnColorListState(&maFixed_ChangeType)
, m_pnBitmapListState(&maFixed_ChangeType)
, m_pnPatternListState(&maFixed_ChangeType)
, m_pnGradientListState(&maFixed_ChangeType)
, m_pnHatchingListState(&maFixed_ChangeType)
, m_aXFillAttr(rInAttrs.GetPool())
, m_rXFSet(m_aXFillAttr.GetItemSet())
, m_xFillTab(m_xBuilder->weld_container("fillstylebox"))
, m_xBtnNone(m_xBuilder->weld_toggle_button("btnnone"))
, m_xBtnColor(m_xBuilder->weld_toggle_button("btncolor"))
, m_xBtnGradient(m_xBuilder->weld_toggle_button("btngradient"))
, m_xBtnHatch(m_xBuilder->weld_toggle_button("btnhatch"))
, m_xBtnBitmap(m_xBuilder->weld_toggle_button("btnbitmap"))
, m_xBtnPattern(m_xBuilder->weld_toggle_button("btnpattern"))
{
get(m_pBtnNone, "btnnone");
get(m_pBtnColor, "btncolor");
get(m_pBtnGradient, "btngradient");
get(m_pBtnHatch, "btnhatch");
get(m_pBtnBitmap, "btnbitmap");
get(m_pBtnPattern, "btnpattern");
get(m_pFillTab, "fillstylebox");
maBox.AddButton( m_pBtnNone );
maBox.AddButton( m_pBtnColor );
maBox.AddButton( m_pBtnGradient );
maBox.AddButton( m_pBtnHatch );
maBox.AddButton( m_pBtnBitmap );
maBox.AddButton( m_pBtnPattern );
Link< Button*, void > aLink = LINK(this, SvxAreaTabPage, SelectFillTypeHdl_Impl);
m_pBtnNone->SetClickHdl(aLink);
m_pBtnColor->SetClickHdl(aLink);
m_pBtnGradient->SetClickHdl(aLink);
m_pBtnHatch->SetClickHdl(aLink);
m_pBtnBitmap->SetClickHdl(aLink);
m_pBtnPattern->SetClickHdl(aLink);
maBox.AddButton(m_xBtnNone.get());
maBox.AddButton(m_xBtnColor.get());
maBox.AddButton(m_xBtnGradient.get());
maBox.AddButton(m_xBtnHatch.get());
maBox.AddButton(m_xBtnBitmap.get());
maBox.AddButton(m_xBtnPattern.get());
Link<weld::ToggleButton&, void> aLink = LINK(this, SvxAreaTabPage, SelectFillTypeHdl_Impl);
m_xBtnNone->connect_toggled(aLink);
m_xBtnColor->connect_toggled(aLink);
m_xBtnGradient->connect_toggled(aLink);
m_xBtnHatch->connect_toggled(aLink);
m_xBtnBitmap->connect_toggled(aLink);
m_xBtnPattern->connect_toggled(aLink);
SetExchangeSupport();
TabPageParent aFillTab(m_pFillTab);
TabPageParent aFillTab(m_xFillTab.get());
// Calculate optimal size of all pages..
m_pFillTabPage.disposeAndReset(SvxColorTabPage::Create(aFillTab, &m_rXFSet));
Size aSize = m_pFillTabPage->GetOptimalSize();
Size aSize = m_pFillTabPage->get_container_size();
m_pFillTabPage.disposeAndReset(SvxGradientTabPage::Create(aFillTab, &m_rXFSet));
lclExtendSize(aSize, m_pFillTabPage->GetOptimalSize());
lclExtendSize(aSize, m_pFillTabPage->get_container_size());
m_pFillTabPage.disposeAndReset(SvxBitmapTabPage::Create(aFillTab, &m_rXFSet));
lclExtendSize(aSize, m_pFillTabPage->GetOptimalSize());
lclExtendSize(aSize, m_pFillTabPage->get_container_size());
m_pFillTabPage.disposeAndReset(SvxHatchTabPage::Create(aFillTab, &m_rXFSet));
lclExtendSize(aSize, m_pFillTabPage->GetOptimalSize());
lclExtendSize(aSize, m_pFillTabPage->get_container_size());
m_pFillTabPage.disposeAndReset(SvxPatternTabPage::Create(aFillTab, &m_rXFSet));
lclExtendSize(aSize, m_pFillTabPage->GetOptimalSize());
lclExtendSize(aSize, m_pFillTabPage->get_container_size());
m_pFillTabPage.disposeAndClear();
m_pFillTab->set_width_request(aSize.Width());
m_pFillTab->set_height_request(aSize.Height());
m_xFillTab->set_size_request(aSize.Width(), aSize.Height());
}
SvxAreaTabPage::~SvxAreaTabPage()
......@@ -157,13 +149,6 @@ SvxAreaTabPage::~SvxAreaTabPage()
void SvxAreaTabPage::dispose()
{
m_pBtnNone.clear();
m_pBtnColor.clear();
m_pBtnGradient.clear();
m_pBtnHatch.clear();
m_pBtnBitmap.clear();
m_pBtnPattern.clear();
m_pFillTab.clear();
m_pFillTabPage.disposeAndClear();
SvxTabPage::dispose();
}
......@@ -183,25 +168,25 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
default:
case drawing::FillStyle_NONE:
{
SelectFillTypeHdl_Impl( m_pBtnNone );
SelectFillTypeHdl_Impl(*m_xBtnNone);
break;
}
case drawing::FillStyle_SOLID:
{
m_rXFSet.Put( static_cast<const XFillColorItem&>( rSet.Get( GetWhich( XATTR_FILLCOLOR ) ) ) );
SelectFillTypeHdl_Impl( m_pBtnColor );
SelectFillTypeHdl_Impl(*m_xBtnColor);
break;
}
case drawing::FillStyle_GRADIENT:
{
m_rXFSet.Put( static_cast<const XFillGradientItem&>( rSet.Get( GetWhich( XATTR_FILLGRADIENT ) ) ) );
SelectFillTypeHdl_Impl( m_pBtnGradient );
SelectFillTypeHdl_Impl(*m_xBtnGradient);
break;
}
case drawing::FillStyle_HATCH:
{
m_rXFSet.Put( rSet.Get(XATTR_FILLHATCH) );
SelectFillTypeHdl_Impl( m_pBtnHatch );
SelectFillTypeHdl_Impl(*m_xBtnHatch);
break;
}
case drawing::FillStyle_BITMAP:
......@@ -210,9 +195,9 @@ void SvxAreaTabPage::ActivatePage( const SfxItemSet& rSet )
// pass full item set here, bitmap fill has many attributes (tiling, size, offset etc.)
m_rXFSet.Put( rSet );
if(!aItem.isPattern())
SelectFillTypeHdl_Impl( m_pBtnBitmap );
SelectFillTypeHdl_Impl(*m_xBtnBitmap);
else
SelectFillTypeHdl_Impl( m_pBtnPattern );
SelectFillTypeHdl_Impl(*m_xBtnPattern);
break;
}
}
......@@ -335,15 +320,14 @@ void SvxAreaTabPage::Reset( const SfxItemSet* rAttrs )
}
}
VclPtr<SfxTabPage> SvxAreaTabPage::Create( TabPageParent pWindow,
const SfxItemSet* rAttrs )
VclPtr<SfxTabPage> SvxAreaTabPage::Create(TabPageParent pParent, const SfxItemSet* rAttrs)
{
return VclPtr<SvxAreaTabPage>::Create( pWindow.pParent, *rAttrs );
return VclPtr<SvxAreaTabPage>::Create(pParent, *rAttrs);
}
namespace {
VclPtr<SfxTabPage> lcl_CreateFillStyleTabPage( sal_uInt16 nId, vcl::Window* pParent, const SfxItemSet& rSet )
VclPtr<SfxTabPage> lcl_CreateFillStyleTabPage(sal_uInt16 nId, TabPageParent pParent, const SfxItemSet& rSet)
{
CreateTabPage fnCreate = nullptr;
switch(nId)
......@@ -361,14 +345,16 @@ VclPtr<SfxTabPage> lcl_CreateFillStyleTabPage( sal_uInt16 nId, vcl::Window* pPar
}
IMPL_LINK(SvxAreaTabPage, SelectFillTypeHdl_Impl, Button*, pButton, void)
IMPL_LINK(SvxAreaTabPage, SelectFillTypeHdl_Impl, weld::ToggleButton&, rButton, void)
{
sal_Int32 nPos = maBox.GetButtonPos( static_cast<PushButton*>(pButton) );
sal_Int32 nPos = maBox.GetButtonPos(&rButton);
if(nPos != -1 && nPos != maBox.GetCurrentButtonPos())
{
maBox.SelectButton(static_cast<PushButton*>(pButton));
maBox.SelectButton(&rButton);
FillType eFillType = static_cast<FillType>(maBox.GetCurrentButtonPos());
m_pFillTabPage.disposeAndReset( lcl_CreateFillStyleTabPage(eFillType, m_pFillTab, m_rXFSet) );
m_pFillTabPage.disposeAndReset(lcl_CreateFillStyleTabPage(eFillType, m_xFillTab.get(), m_rXFSet));
if (m_pFillTabPage)
m_pFillTabPage->SetTabDialog(GetTabDialog());
CreatePage( eFillType , m_pFillTabPage);
}
}
......
......@@ -341,7 +341,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
}
SvxAbstractDialogFactory* pFact = SvxAbstractDialogFactory::Create();
ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetFrameWeld(), aName, aDesc));
ScopedVclPtr<AbstractSvxNameDialog> pDlg(pFact->CreateSvxNameDialog(GetTabDialog()->GetFrameWeld(), aName, aDesc));
sal_uInt16 nError = 1;
while (pDlg->Execute() == RET_OK)
......@@ -355,7 +355,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickAddHdl_Impl, weld::Button&, void)
break;
}
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::Builder> xBuilder(Application::CreateBuilder(GetTabDialog()->GetFrameWeld(), "cui/ui/queryduplicatedialog.ui"));
std::unique_ptr<weld::MessageDialog> xWarnBox(xBuilder->weld_message_dialog("DuplicateNameDialog"));
if (xWarnBox->run() != RET_OK)
break;
......@@ -395,7 +395,7 @@ IMPL_LINK_NOARG(SvxColorTabPage, ClickWorkOnHdl_Impl, weld::Button&, void)
aColorDlg.SetColor (aCurrentColor);
aColorDlg.SetMode( svtools::ColorPickerMode::Modify );
if (aColorDlg.Execute(GetFrameWeld()) == RET_OK)
if (aColorDlg.Execute(GetTabDialog()->GetFrameWeld()) == RET_OK)
{
Color aPreviewColor = aColorDlg.GetColor();
aCurrentColor = aPreviewColor;
......
This diff is collapsed.
......@@ -41,7 +41,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btnnone">
<object class="GtkToggleButton" id="btnnone">
<property name="label" translatable="yes" context="areatabpage|btnnone">None</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -54,7 +54,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btncolor">
<object class="GtkToggleButton" id="btncolor">
<property name="label" translatable="yes" context="areatabpage|btncolor">Color</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -67,7 +67,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btngradient">
<object class="GtkToggleButton" id="btngradient">
<property name="label" translatable="yes" context="areatabpage|btngradient">Gradient</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -80,7 +80,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btnbitmap">
<object class="GtkToggleButton" id="btnbitmap">
<property name="label" translatable="yes" context="areatabpage|btnbitmap">Bitmap</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -93,7 +93,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btnpattern">
<object class="GtkToggleButton" id="btnpattern">
<property name="label" translatable="yes" context="areatabpage|btnpattern">Pattern</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......@@ -106,7 +106,7 @@
</packing>
</child>
<child>
<object class="GtkButton" id="btnhatch">
<object class="GtkToggleButton" id="btnhatch">
<property name="label" translatable="yes" context="areatabpage|btnhatch">Hatch</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.18.3 -->
<!-- Generated with glade 3.22.1 -->
<interface domain="cui">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkAdjustment" id="adjustment1">
<property name="upper">100</property>
<property name="step_increment">1</property>
<property name="page_increment">10</property>
</object>
<object class="GtkBox" id="BitmapTabPage">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="border_width">6</property>
<property name="spacing">6</property>
<child>
......@@ -23,17 +29,35 @@
<property name="top_padding">6</property>
<property name="left_padding">12</property>
<child>
<object class="GtkVBox" id="box1">
<object class="GtkBox" id="box1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="halign">start</property>
<property name="orientation">vertical</property>
<property name="spacing">6</property>
<child>
<object class="svxcorelo-SvxPresetListBox" id="BITMAP">
<object class="GtkScrolledWindow" id="bitmapwin">
<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>
<child>
<object class="GtkDrawingArea" id="BITMAP">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
......@@ -171,7 +195,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="bitmaptabpage|label5">Width:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">width:0%</property>
<property name="mnemonic_widget">width</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -180,7 +204,7 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="width:0%">
<object class="GtkSpinButton" id="width">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
......@@ -197,7 +221,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="bitmaptabpage|label6">Height:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">height:0%</property>
<property name="mnemonic_widget">height</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -206,7 +230,7 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="height:0%">
<object class="GtkSpinButton" id="height">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
......@@ -328,7 +352,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="bitmaptabpage|label10">X-Offset:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">posoffx:0%</property>
<property name="mnemonic_widget">posoffx</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -337,7 +361,7 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="posoffx:0%">
<object class="GtkSpinButton" id="posoffx">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
......@@ -353,7 +377,7 @@
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="bitmaptabpage|label11">Y-Offset:</property>
<property name="use_underline">True</property>
<property name="mnemonic_widget">posoffy:0%</property>
<property name="mnemonic_widget">posoffy</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -362,7 +386,7 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="posoffy:0%">
<object class="GtkSpinButton" id="posoffy">
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
......@@ -429,10 +453,11 @@
</packing>
</child>
<child>
<object class="GtkSpinButton" id="tileoffmtr:0%">
<object class="GtkSpinButton" id="tileoffmtr">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="adjustment">adjustment1</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -498,14 +523,31 @@
<property name="valign">start</property>
<property name="orientation">vertical</property>
<child>
<object class="svxlo-SvxXRectPreview" id="CTL_BITMAP_PREVIEW">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CTL_BITMAP_PREVIEW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="bitmaptabpage|CTL_BITMAP_PREVIEW-atkobject">Example</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>
<child>
<object class="GtkDrawingArea" id="CTL_BITMAP_PREVIEW">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="CTL_BITMAP_PREVIEW-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="bitmaptabpage|CTL_BITMAP_PREVIEW-atkobject">Example</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
......
......@@ -319,14 +319,31 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkDrawingArea" id="oldpreview">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="oldpreview-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="colorpage|oldpreview-atkobject">Old Color</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>
<child>
<object class="GtkDrawingArea" id="oldpreview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="oldpreview-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="colorpage|oldpreview-atkobject">Old Color</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
......@@ -621,14 +638,31 @@
<property name="can_focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkDrawingArea" id="newpreview">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="newpreview-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="colorpage|newpreview-atkobject">New Color</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>
<child>
<object class="GtkDrawingArea" id="newpreview">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="accessible">
<object class="AtkObject" id="newpreview-atkobject">
<property name="AtkObject::accessible-name" translatable="yes" context="colorpage|newpreview-atkobject">New Color</property>
</object>
</child>
</object>
</child>
</object>
</child>
</object>
......
This diff is collapsed.
This diff is collapsed.
......@@ -284,9 +284,6 @@
<glade-widget-class title="Shadow Preview" name="svxlo-SvxXShadowPreview"
generic-name="Shadow Preview Window" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Bitmap Pixel Editor" name="svxlo-SvxPixelCtl"
generic-name="Bitmap Pixel Editor" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
<glade-widget-class title="Svx 3D Light Control" name="svxlo-SvxLightCtl3D"
generic-name="3D Light Control" parent="GtkDrawingArea"
icon-name="widget-gtk-drawingarea"/>
......
......@@ -352,7 +352,9 @@ protected:
}
SfxTabDialog* GetTabDialog() const;
public:
void SetTabDialog(SfxTabDialog* pDialog);
protected:
SfxTabDialogController* GetDialogController() const;
void SetDialogController(SfxTabDialogController* pDialog);
......@@ -394,6 +396,12 @@ public:
css::uno::Reference< css::frame::XFrame > GetFrame();
OString GetConfigId() const;
//TODO rename to get_preferred_size when SfxTabPage doesn't inherit from anything
Size get_container_size() const
{