summaryrefslogtreecommitdiff
path: root/include/vcl
diff options
context:
space:
mode:
authorMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-01-07 14:23:31 +0100
committerMarkus Mohrhard <markus.mohrhard@googlemail.com>2018-01-07 18:07:04 +0100
commite66a0d7095260c62b067541a0c47ce5c07074f18 (patch)
tree3580f6c4c309e322bbab9106979e4b63ecedf9ec /include/vcl
parent8d52646747cc70a6c01174cb1a168ece4c95ac68 (diff)
uitest: add support for GtkTextView/VclMultiLineEdit
Change-Id: If1f22ee562b73a54042985254e0b9cd127025b55 Reviewed-on: https://gerrit.libreoffice.org/47529 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Markus Mohrhard <markus.mohrhard@googlemail.com>
Diffstat (limited to 'include/vcl')
-rw-r--r--include/vcl/uitest/uiobject.hxx21
-rw-r--r--include/vcl/vclmedit.hxx46
2 files changed, 66 insertions, 1 deletions
diff --git a/include/vcl/uitest/uiobject.hxx b/include/vcl/uitest/uiobject.hxx
index de413107903e..0493cbc19c98 100644
--- a/include/vcl/uitest/uiobject.hxx
+++ b/include/vcl/uitest/uiobject.hxx
@@ -192,6 +192,27 @@ protected:
virtual OUString get_name() const override;
};
+class UITEST_DLLPUBLIC MultiLineEditUIObject : public WindowUIObject
+{
+ VclPtr<VclMultiLineEdit> mxEdit;
+
+public:
+
+ MultiLineEditUIObject(const VclPtr<VclMultiLineEdit>& xEdit);
+ virtual ~MultiLineEditUIObject() override;
+
+ virtual void execute(const OUString& rAction,
+ const StringMap& rParameters) override;
+
+ virtual StringMap get_state() override;
+
+ static std::unique_ptr<UIObject> create(vcl::Window* pWindow);
+
+protected:
+
+ virtual OUString get_name() const override;
+};
+
// TODO: moggi: maybe let it inherit from the button case
class UITEST_DLLPUBLIC CheckBoxUIObject : public WindowUIObject
{
diff --git a/include/vcl/vclmedit.hxx b/include/vcl/vclmedit.hxx
index 03f0b5667968..7caf3662aa0e 100644
--- a/include/vcl/vclmedit.hxx
+++ b/include/vcl/vclmedit.hxx
@@ -31,6 +31,47 @@ class Timer;
class ExtTextEngine;
class TextView;
+class TextWindow : public vcl::Window
+{
+private:
+ VclPtr<Edit> mxParent;
+ ExtTextEngine* mpExtTextEngine;
+ TextView* mpExtTextView;
+
+ bool mbInMBDown;
+ bool mbFocusSelectionHide;
+ bool mbIgnoreTab;
+ bool mbActivePopup;
+ bool mbSelectOnTab;
+
+public:
+ explicit TextWindow(Edit* pParent);
+ virtual ~TextWindow() override;
+ virtual void dispose() override;
+
+ ExtTextEngine* GetTextEngine() const { return mpExtTextEngine; }
+ TextView* GetTextView() const { return mpExtTextView; }
+
+ 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& rKEvent ) override;
+
+ virtual void Command( const CommandEvent& rCEvt ) override;
+
+ virtual void Paint(vcl::RenderContext& rRenderContext, const tools::Rectangle& rRect) override;
+ virtual void Resize() override;
+
+ virtual void GetFocus() override;
+ virtual void LoseFocus() override;
+
+ void SetAutoFocusHide( bool bAutoHide ) { mbFocusSelectionHide = bAutoHide; }
+
+ void SetIgnoreTab( bool bIgnore ) { mbIgnoreTab = bIgnore; }
+
+ void DisableSelectionOnFocus() { mbSelectOnTab = false; }
+};
+
class VCL_DLLPUBLIC VclMultiLineEdit : public Edit
{
friend class VCLXAccessibleEdit;
@@ -55,8 +96,8 @@ protected:
void ImplInitSettings( bool bBackground );
static WinBits ImplInitStyle( WinBits nStyle );
- ExtTextEngine* GetTextEngine() const;
TextView* GetTextView() const;
+ ExtTextEngine* GetTextEngine() const;
ScrollBar* GetVScrollBar() const;
virtual void ApplySettings(vcl::RenderContext& rRenderContext) override;
@@ -133,6 +174,9 @@ public:
void EnableCursor( bool bEnable );
+ TextWindow* GetTextWindow();
+ virtual FactoryFunction GetUITestFactory() const override;
+
virtual bool set_property(const OString &rKey, const OUString &rValue) override;
};