Kaydet (Commit) 2fb6e836 authored tarafından Caolán McNamara's avatar Caolán McNamara

weld ScHFEditPage

Change-Id: Icf40e51ed40659cc79b61798de47132162e86541
Reviewed-on: https://gerrit.libreoffice.org/70414
Tested-by: Jenkins
Reviewed-by: 's avatarCaolán McNamara <caolanm@redhat.com>
Tested-by: 's avatarCaolán McNamara <caolanm@redhat.com>
üst 6e7bfc89
......@@ -328,10 +328,6 @@
generic-name="Cursor Reference Edit" parent="foruilo-RefEdit"
icon-name="widget-gtk-textentry"/>
<glade-widget-class title="Text View" name="sclo-ScEditWindow"
generic-name="Text View" parent="GtkTextView"
icon-name="widget-gtk-textentry"/>
<glade-widget-class title="Open Document ListBox" name="dbulo-OpenDocumentListBox"
generic-name="Open Document ListBox" parent="GtkComboBox"
icon-name="widget-gtk-combobox"/>
......
......@@ -38,6 +38,7 @@ public:
virtual tools::Rectangle GetFocusRect() { return tools::Rectangle(); }
virtual FactoryFunction GetUITestFactory() const { return nullptr; }
virtual OUString RequestHelp(tools::Rectangle&) { return OUString(); }
virtual OUString GetHelpText() const { return m_pDrawingArea->get_tooltip_text(); }
Size const& GetOutputSizePixel() const { return m_aSize; }
void SetOutputSizePixel(const Size& rSize) { m_aSize = rSize; }
virtual void SetDrawingArea(weld::DrawingArea* pDrawingArea) { m_pDrawingArea = pDrawingArea; }
......@@ -124,6 +125,8 @@ public:
void set_sensitive(bool bSensitive) { m_xDrawingArea->set_sensitive(bSensitive); }
bool get_sensitive() const { return m_xDrawingArea->get_sensitive(); }
bool get_visible() const { return m_xDrawingArea->get_visible(); }
void set_grid_left_attach(int nAttach) { m_xDrawingArea->set_grid_left_attach(nAttach); }
int get_grid_left_attach() const { return m_xDrawingArea->get_grid_left_attach(); }
};
}
#endif
......
......@@ -241,6 +241,12 @@ public:
void
CommitChange(const css::accessibility::AccessibleEventObject& rEvent) const;
/// Use this method to set initial Name without notification
void SetName(const OUString& rName) { msName = rName; }
/// Use this method to set initial Description without notification
void SetDescription(const OUString& rDesc) { msDescription = rDesc; }
protected:
/// Calls all FocusListener to tell they that the focus is gained.
void CommitFocusGained() const;
......@@ -253,11 +259,6 @@ protected:
/// @throws css::lang::DisposedException
void IsObjectValid() const;
/// Use this method to set initial Name without notification
void SetName(const OUString& rName) { msName = rName; }
/// Use this method to set initial Description without notification
void SetDescription(const OUString& rDesc) { msDescription = rDesc; }
/// Reference to the parent object.
css::uno::Reference<css::accessibility::XAccessible> mxParent;
......
......@@ -21,8 +21,8 @@
#define INCLUDED_SC_SOURCE_UI_INC_SCUITPHFEDIT_HXX
#include "tphfedit.hxx"
#include <sfx2/tabdlg.hxx>
#include <vcl/menubtn.hxx>
#include <vcl/customweld.hxx>
#include <vcl/weld.hxx>
enum ScHFEntryId
{
......@@ -54,40 +54,48 @@ public:
void ClearTextAreas();
protected:
ScHFEditPage( vcl::Window* pParent,
ScHFEditPage( TabPageParent pParent,
const SfxItemSet& rCoreSet,
sal_uInt16 nWhich,
bool bHeader );
virtual ~ScHFEditPage() override;
virtual void dispose() override;
private:
VclPtr<ScEditWindow> m_pWndLeft;
VclPtr<ScEditWindow> m_pWndCenter;
VclPtr<ScEditWindow> m_pWndRight;
VclPtr<FixedText> m_pFtDefinedHF;
VclPtr<ListBox> m_pLbDefined;
VclPtr<FixedText> m_pFtCustomHF;
VclPtr<PushButton> m_pBtnText;
VclPtr<MenuButton> m_pBtnFile;
VclPtr<PushButton> m_pBtnTable;
VclPtr<PushButton> m_pBtnPage;
VclPtr<PushButton> m_pBtnLastPage;
VclPtr<PushButton> m_pBtnDate;
VclPtr<PushButton> m_pBtnTime;
VclPtr<FixedText> m_pFtConfidential;
VclPtr<FixedText> m_pFtPage;
VclPtr<FixedText> m_pFtOfQuestion;
VclPtr<FixedText> m_pFtOf;
VclPtr<FixedText> m_pFtNone;
VclPtr<FixedText> m_pFtCreatedBy;
VclPtr<FixedText> m_pFtCustomized;
sal_uInt16 const nWhich;
bool m_bDropDownActive;
sal_Int64 m_nTimeToggled;
std::unique_ptr<weld::Label> m_xFtDefinedHF;
std::unique_ptr<weld::ComboBox> m_xLbDefined;
std::unique_ptr<weld::Label> m_xFtCustomHF;
std::unique_ptr<weld::Button> m_xBtnText;
std::unique_ptr<weld::MenuButton> m_xBtnFile;
std::unique_ptr<weld::Button> m_xBtnTable;
std::unique_ptr<weld::Button> m_xBtnPage;
std::unique_ptr<weld::Button> m_xBtnLastPage;
std::unique_ptr<weld::Button> m_xBtnDate;
std::unique_ptr<weld::Button> m_xBtnTime;
std::unique_ptr<weld::Label> m_xFtConfidential;
std::unique_ptr<weld::Label> m_xFtPage;
std::unique_ptr<weld::Label> m_xFtOfQuestion;
std::unique_ptr<weld::Label> m_xFtOf;
std::unique_ptr<weld::Label> m_xFtNone;
std::unique_ptr<weld::Label> m_xFtCreatedBy;
std::unique_ptr<weld::Label> m_xFtCustomized;
std::unique_ptr<weld::Widget> m_xLeft;
std::unique_ptr<weld::Widget> m_xRight;
std::unique_ptr<ScEditWindow> m_xWndLeft;
std::unique_ptr<ScEditWindow> m_xWndCenter;
std::unique_ptr<ScEditWindow> m_xWndRight;
std::unique_ptr<weld::CustomWeld> m_xWndLeftWnd;
std::unique_ptr<weld::CustomWeld> m_xWndCenterWnd;
std::unique_ptr<weld::CustomWeld> m_xWndRightWnd;
ScEditWindow * m_pEditFocus; ///one of m_pWndLeft, m_pWndCenter, m_pWndRight
sal_uInt16 const nWhich;
DECL_LINK( ObjectSelectHdl, ScEditWindow&, void );
private:
......@@ -99,9 +107,10 @@ private:
bool IsPageEntry(EditEngine*pEngine, const EditTextObject* pTextObj);
static bool IsDateEntry(const EditTextObject* pTextObj);
static bool IsExtFileNameEntry(const EditTextObject* pTextObj);
DECL_LINK( ListHdl_Impl, ListBox&, void);
DECL_LINK( ClickHdl, Button*, void );
DECL_LINK( MenuHdl, MenuButton*, void );
DECL_LINK( ListHdl_Impl, weld::ComboBox&, void);
DECL_LINK( ListToggleHdl_Impl, weld::ComboBox&, void);
DECL_LINK( ClickHdl, weld::Button&, void );
DECL_LINK( MenuHdl, const OString&, void );
};
class ScRightHeaderEditPage : public ScHFEditPage
......@@ -111,7 +120,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
ScRightHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
ScRightHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftHeaderEditPage : public ScHFEditPage
......@@ -121,7 +130,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
ScLeftHeaderEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
ScLeftHeaderEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScRightFooterEditPage : public ScHFEditPage
......@@ -131,7 +140,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
ScRightFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
ScRightFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
class ScLeftFooterEditPage : public ScHFEditPage
......@@ -141,7 +150,7 @@ public:
static VclPtr<SfxTabPage> Create( TabPageParent pParent, const SfxItemSet* rCoreSet );
private:
ScLeftFooterEditPage( vcl::Window* pParent, const SfxItemSet& rSet );
ScLeftFooterEditPage( TabPageParent pParent, const SfxItemSet& rSet );
};
#endif
......
......@@ -23,9 +23,9 @@
#include <scdllapi.h>
#include <cppuhelper/weakref.hxx>
#include <tools/wintypes.hxx>
#include <editeng/editview.hxx>
#include <editeng/svxenum.hxx>
#include <vcl/ctrl.hxx>
#include <vcl/menu.hxx>
#include <vcl/customweld.hxx>
#include <functional>
......@@ -46,16 +46,15 @@ enum ScEditWindowLocation
Right
};
class SC_DLLPUBLIC ScEditWindow : public Control
class SC_DLLPUBLIC ScEditWindow : public weld::CustomWidgetController
, public EditViewCallbacks
{
public:
ScEditWindow( vcl::Window* pParent, WinBits nBits , ScEditWindowLocation eLoc );
virtual ~ScEditWindow() override;
virtual void dispose() override;
ScEditWindow(ScEditWindowLocation eLoc, weld::Window* pParent);
virtual void SetDrawingArea(weld::DrawingArea* pArea) override;
virtual ~ScEditWindow() override;
using Control::SetFont;
void SetFont( const ScPatternAttr& rPattern );
using Control::SetText;
void SetText( const EditTextObject& rTextObject );
std::unique_ptr<EditTextObject> CreateTextObject();
void SetCharAttributes();
......@@ -73,20 +72,37 @@ public:
void SetLocation(ScEditWindowLocation eLoc) { eLocation = eLoc; }
protected:
virtual void Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect ) override;
virtual void MouseMove( const MouseEvent& rMEvt ) override;
virtual void MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual void MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual void KeyInput( const KeyEvent& rKEvt ) override;
virtual void Command( const CommandEvent& rCEvt ) override;
virtual bool MouseMove( const MouseEvent& rMEvt ) override;
virtual bool MouseButtonDown( const MouseEvent& rMEvt ) override;
virtual bool MouseButtonUp( const MouseEvent& rMEvt ) override;
virtual bool KeyInput( const KeyEvent& rKEvt ) override;
virtual void GetFocus() override;
virtual void LoseFocus() override;
virtual void Resize() override;
virtual void EditViewInvalidate(const tools::Rectangle& rRect) const override
{
weld::DrawingArea* pDrawingArea = GetDrawingArea();
pDrawingArea->queue_draw_area(rRect.Left(), rRect.Top(), rRect.GetWidth(), rRect.GetHeight());
}
virtual void EditViewSelectionChange() const override
{
weld::DrawingArea* pDrawingArea = GetDrawingArea();
pDrawingArea->queue_draw();
}
virtual OutputDevice& EditViewOutputDevice() const override
{
return GetDrawingArea()->get_ref_device();
}
private:
std::unique_ptr<ScHeaderEditEngine> pEdEngine;
std::unique_ptr<EditView> pEdView;
ScEditWindowLocation eLocation;
bool mbRTL;
weld::Window* mpDialog;
css::uno::WeakReference< css::accessibility::XAccessible > xAcc;
ScAccessibleEditObject* pAcc;
......
......@@ -59,26 +59,39 @@ static void lcl_GetFieldData( ScHeaderFieldData& rData )
// class ScEditWindow
ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLocation eLoc )
: Control( pParent, nBits ),
eLocation(eLoc),
pAcc(nullptr)
ScEditWindow::ScEditWindow(ScEditWindowLocation eLoc, weld::Window* pDialog)
: eLocation(eLoc)
, mbRTL(ScGlobal::IsSystemRTL())
, mpDialog(pDialog)
, pAcc(nullptr)
{
}
void ScEditWindow::SetDrawingArea(weld::DrawingArea* pDrawingArea)
{
OutputDevice& rDevice = pDrawingArea->get_ref_device();
Size aSize = rDevice.LogicToPixel(Size(80, 120), MapMode(MapUnit::MapAppFont));
pDrawingArea->set_size_request(aSize.Width(), aSize.Height());
SetOutputSizePixel(aSize);
weld::CustomWidgetController::SetDrawingArea(pDrawingArea);
EnableRTL(false);
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Color aBgColor = rStyleSettings.GetWindowColor();
SetMapMode(MapMode(MapUnit::MapTwip));
SetPointer( PointerStyle::Text );
SetBackground( aBgColor );
rDevice.SetMapMode(MapMode(MapUnit::MapTwip));
rDevice.SetBackground(aBgColor);
Size aSize( GetOutputSize() );
Size aOutputSize(rDevice.PixelToLogic(aSize));
aSize = aOutputSize;
aSize.setHeight( aSize.Height() * 4 );
pEdEngine.reset( new ScHeaderEditEngine( EditEngine::CreatePool() ) );
pEdEngine->SetPaperSize( aSize );
pEdEngine->SetRefDevice( this );
pEdEngine->SetRefDevice( &rDevice );
ScHeaderFieldData aData;
lcl_GetFieldData( aData );
......@@ -86,33 +99,34 @@ ScEditWindow::ScEditWindow( vcl::Window* pParent, WinBits nBits, ScEditWindowLoc
// fields
pEdEngine->SetData( aData );
pEdEngine->SetControlWord( pEdEngine->GetControlWord() | EEControlBits::MARKFIELDS );
mbRTL = ScGlobal::IsSystemRTL();
if (mbRTL)
pEdEngine->SetDefaultHorizontalTextDirection(EEHorizontalTextDirection::R2L);
pEdView.reset( new EditView( pEdEngine.get(), this ) );
pEdView->SetOutputArea( tools::Rectangle( Point(0,0), GetOutputSize() ) );
pEdView.reset(new EditView(pEdEngine.get(), nullptr));
pEdView->setEditViewCallbacks(this);
pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize));
pEdView->SetBackgroundColor( aBgColor );
pEdEngine->InsertView( pEdView.get() );
pDrawingArea->set_text_cursor();
if (pAcc)
pAcc->SetDescription(pDrawingArea->get_tooltip_text());
}
void ScEditWindow::Resize()
{
Size aOutputSize(GetOutputSize());
OutputDevice& rDevice = GetDrawingArea()->get_ref_device();
Size aOutputSize(rDevice.PixelToLogic(GetOutputSizePixel()));
Size aSize(aOutputSize);
aSize.setHeight( aSize.Height() * 4 );
pEdEngine->SetPaperSize(aSize);
pEdView->SetOutputArea(tools::Rectangle(Point(0,0), aOutputSize));
Control::Resize();
weld::CustomWidgetController::Resize();
}
ScEditWindow::~ScEditWindow()
{
disposeOnce();
}
void ScEditWindow::dispose()
{
// delete Accessible object before deleting EditEngine and EditView
if (pAcc)
......@@ -123,12 +137,6 @@ void ScEditWindow::dispose()
}
pEdEngine.reset();
pEdView.reset();
Control::dispose();
}
extern "C" SAL_DLLPUBLIC_EXPORT void makeScEditWindow(VclPtr<vcl::Window> & rRet, VclPtr<vcl::Window> & pParent, VclBuilder::stringmap &)
{
rRet = VclPtr<ScEditWindow>::Create(pParent, WB_BORDER|WB_TABSTOP, Left);
}
void ScEditWindow::SetNumType(SvxNumType eNumType)
......@@ -196,9 +204,8 @@ void ScEditWindow::SetCharAttributes()
ScAbstractDialogFactory* pFact = ScAbstractDialogFactory::Create();
vcl::Window* pWin = GetParent();
ScopedVclPtr<SfxAbstractTabDialog> pDlg(pFact->CreateScCharDlg(
pWin ? pWin->GetFrameWeld() : nullptr, &aSet, pDocSh));
mpDialog, &aSet, pDocSh));
pDlg->SetText( ScResId( STR_TEXTATTRS ) );
if ( pDlg->Execute() == RET_OK )
{
......@@ -213,62 +220,81 @@ void ScEditWindow::SetCharAttributes()
void ScEditWindow::Paint( vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect )
{
//note: ClassificationEditView::Paint is similar
rRenderContext.Push(PushFlags::ALL);
rRenderContext.SetClipRegion();
const StyleSettings& rStyleSettings = Application::GetSettings().GetStyleSettings();
Color aBgColor = rStyleSettings.GetWindowColor();
pEdView->SetBackgroundColor( aBgColor );
SetBackground( aBgColor );
Control::Paint(rRenderContext, rRect);
rRenderContext.SetBackground( aBgColor );
pEdView->Paint(rRect);
tools::Rectangle aLogicRect(rRenderContext.PixelToLogic(rRect));
pEdView->Paint(aLogicRect, &rRenderContext);
if( HasFocus() )
if (HasFocus())
{
pEdView->ShowCursor();
vcl::Cursor* pCursor = pEdView->GetCursor();
pCursor->DrawToDevice(rRenderContext);
}
std::vector<tools::Rectangle> aLogicRects;
// get logic selection
pEdView->GetSelectionRectangles(aLogicRects);
rRenderContext.SetLineColor();
rRenderContext.SetFillColor(COL_BLACK);
rRenderContext.SetRasterOp(RasterOp::Invert);
for (const auto &rSelectionRect : aLogicRects)
rRenderContext.DrawRect(rSelectionRect);
rRenderContext.Pop();
}
void ScEditWindow::MouseMove( const MouseEvent& rMEvt )
bool ScEditWindow::MouseMove( const MouseEvent& rMEvt )
{
pEdView->MouseMove( rMEvt );
return pEdView->MouseMove( rMEvt );
}
void ScEditWindow::MouseButtonDown( const MouseEvent& rMEvt )
bool ScEditWindow::MouseButtonDown( const MouseEvent& rMEvt )
{
if ( !HasFocus() )
GrabFocus();
pEdView->MouseButtonDown( rMEvt );
return pEdView->MouseButtonDown( rMEvt );
}
void ScEditWindow::MouseButtonUp( const MouseEvent& rMEvt )
bool ScEditWindow::MouseButtonUp( const MouseEvent& rMEvt )
{
pEdView->MouseButtonUp( rMEvt );
return pEdView->MouseButtonUp( rMEvt );
}
void ScEditWindow::KeyInput( const KeyEvent& rKEvt )
bool ScEditWindow::KeyInput( const KeyEvent& rKEvt )
{
sal_uInt16 nKey = rKEvt.GetKeyCode().GetModifier()
+ rKEvt.GetKeyCode().GetCode();
if ( nKey == KEY_TAB || nKey == KEY_TAB + KEY_SHIFT )
{
Control::KeyInput( rKEvt );
return false;
}
else if ( !pEdView->PostKeyEvent( rKEvt ) )
{
Control::KeyInput( rKEvt );
return false;
}
else if ( !rKEvt.GetKeyCode().IsMod1() && !rKEvt.GetKeyCode().IsShift() &&
rKEvt.GetKeyCode().IsMod2() && rKEvt.GetKeyCode().GetCode() == KEY_DOWN )
{
aObjectSelectLink.Call(*this);
return true;
}
}
void ScEditWindow::Command( const CommandEvent& rCEvt )
{
pEdView->Command( rCEvt );
return false;
}
void ScEditWindow::GetFocus()
......@@ -286,7 +312,7 @@ void ScEditWindow::GetFocus()
else
pAcc = nullptr;
Control::GetFocus();
weld::CustomWidgetController::GetFocus();
}
void ScEditWindow::LoseFocus()
......@@ -298,13 +324,13 @@ void ScEditWindow::LoseFocus()
}
else
pAcc = nullptr;
Control::LoseFocus();
weld::CustomWidgetController::LoseFocus();
Invalidate(); // redraw without cursor
}
css::uno::Reference< css::accessibility::XAccessible > ScEditWindow::CreateAccessible()
{
OUString sName;
OUString sDescription(GetHelpText());
switch (eLocation)
{
case Left:
......@@ -323,10 +349,13 @@ css::uno::Reference< css::accessibility::XAccessible > ScEditWindow::CreateAcces
}
break;
}
#if 0
//TODO
pAcc = new ScAccessibleEditObject(GetAccessibleParentWindow()->GetAccessible(), pEdView.get(), this,
sName, sDescription, ScAccessibleEditObject::EditControl);
sName, OUString(), ScAccessibleEditObject::EditControl);
css::uno::Reference< css::accessibility::XAccessible > xAccessible = pAcc;
xAcc = xAccessible;
#endif
return pAcc;
}
......
......@@ -2,7 +2,6 @@
<!-- Generated with glade 3.22.1 -->
<interface domain="sc">
<requires lib="gtk+" version="3.18"/>
<requires lib="LibreOffice" version="1.0"/>
<object class="GtkImage" id="imageBTN_DATE">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -38,6 +37,34 @@
<property name="can_focus">False</property>
<property name="icon_name">sc/res/time.png</property>
</object>
<object class="GtkMenu" id="popup">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuItem" id="title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|title">Title</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="filename">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|filename">File Name</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="pathname">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|pathname">Path/File Name</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
<object class="GtkBox" id="HeaderFooterContent">
<property name="visible">True</property>
<property name="can_focus">False</property>
......@@ -94,11 +121,24 @@
</packing>
</child>
<child>
<object class="sclo-ScEditWindow" id="textviewWND_LEFT">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="wrap_mode">word</property>
<property name="overwrite">True</property>
<property name="border_width">0</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="textviewWND_LEFT">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
......@@ -106,9 +146,24 @@
</packing>
</child>
<child>
<object class="sclo-ScEditWindow" id="textviewWND_CENTER">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</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="textviewWND_CENTER">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">1</property>
......@@ -116,9 +171,24 @@
</packing>
</child>
<child>
<object class="sclo-ScEditWindow" id="textviewWND_RIGHT">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="border_width">0</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="textviewWND_RIGHT">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="events">GDK_BUTTON_MOTION_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK</property>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="left_attach">2</property>
......@@ -247,6 +317,8 @@
<property name="tooltip_text" translatable="yes" context="headerfootercontent|buttonBTN_FILE|tooltip_text">Title</property>
<property name="image">imageBTN_FILE</property>
<property name="draw_indicator">True</property>
<property name="popup">popup</property>
<property name="use_popover">False</property>
</object>
<packing>
<property name="expand">False</property>
......@@ -487,32 +559,4 @@
</packing>
</child>
</object>
<object class="GtkMenu" id="popup">
<property name="visible">True</property>
<property name="can_focus">False</property>
<child>
<object class="GtkMenuItem" id="title">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|title">Title</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="filename">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|filename">File Name</property>
<property name="use_underline">True</property>
</object>
</child>
<child>
<object class="GtkMenuItem" id="pathname">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="label" translatable="yes" context="headerfootercontent|pathname">Path/File Name</property>
<property name="use_underline">True</property>
</object>
</child>
</object>
</interface>
......@@ -471,7 +471,6 @@ custom_widgets = [
'ScCursorRefEdit',
'ScDataTableView',
'ScDoubleField',
'ScEditWindow',
'ScPivotLayoutTreeList',
'ScPivotLayoutTreeListData',
'ScPivotLayoutTreeListLabel',
......
......@@ -128,6 +128,8 @@ void ClassificationEditView::InvertSelectionWeight()
void ClassificationEditView::Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect)
{
//note: ScEditWindow::Paint is similar
rRenderContext.Push(PushFlags::ALL);
rRenderContext.SetClipRegion();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment