cui/source/dialogs/cuicharmap.cxx | 19 ++++++++++++++ cui/source/inc/cuicharmap.hxx | 3 ++ cui/uiconfig/ui/specialcharacters.ui | 47 +++++++++++++++++++++++++++++------ 3 files changed, 62 insertions(+), 7 deletions(-)
New commits: commit 98a44dbadab9fee22ddebebb0b3e08691b818021 Author: Vincent Le Garrec <legarrec.vinc...@gmail.com> Date: Mon Jan 15 23:20:29 2018 +0100 Add event to draw checkbox When box is checked, the drawingarea is visible instead of the showchar. Change-Id: I1f1219eb0087a8aff4d70c856c4b2823249b0ceb diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx index ef849a56f8d6..4c6a2b3a3d82 100644 --- a/cui/source/dialogs/cuicharmap.cxx +++ b/cui/source/dialogs/cuicharmap.cxx @@ -64,6 +64,8 @@ SvxCharacterMap::SvxCharacterMap( vcl::Window* pParent, const SfxItemSet* pSet, get(m_pShowSet, "showcharset"); get(m_pSearchSet, "searchcharset"); get(m_pShowChar, "showchar"); + get(m_pDrawChk, "drawcheckbutton"); + get(m_pDrawingArea, "drawingarea"); m_pShowChar->SetCentered(true); if (m_bHasInsert) get(m_pOKBtn, "insert"); else get(m_pOKBtn, "ok"); @@ -188,6 +190,8 @@ void SvxCharacterMap::dispose() m_pSubsetText.clear(); m_pSubsetLB.clear(); m_pShowChar.clear(); + m_pDrawChk.clear(); + m_pDrawingArea.clear(); m_pHexCodeText.clear(); m_pDecimalCodeText.clear(); m_pCharName.clear(); @@ -486,6 +490,8 @@ void SvxCharacterMap::init() m_pShowSet->SetPreSelectHdl( LINK( this, SvxCharacterMap, CharPreSelectHdl ) ); m_pShowSet->SetFavClickHdl( LINK( this, SvxCharacterMap, FavClickHdl ) ); + m_pDrawChk->SetClickHdl( LINK( this, SvxCharacterMap, DrawToggleHdl ) ); + m_pSearchSet->SetDoubleClickHdl( LINK( this, SvxCharacterMap, SearchCharDoubleClickHdl ) ); m_pSearchSet->SetSelectHdl( LINK( this, SvxCharacterMap, SearchCharSelectHdl ) ); m_pSearchSet->SetHighlightHdl( LINK( this, SvxCharacterMap, SearchCharHighlightHdl ) ); @@ -939,6 +945,19 @@ IMPL_LINK_NOARG(SvxCharacterMap, InsertClickHdl, Button*, void) EndDialog(RET_OK); } +IMPL_LINK_NOARG(SvxCharacterMap, DrawToggleHdl, Button*, void) +{ + if (m_pDrawChk->IsChecked()) + { + m_pDrawingArea->Show(); + m_pShowChar->Hide(); + } + else + { + m_pDrawingArea->Hide(); + m_pShowChar->Show(); + } +} IMPL_STATIC_LINK(SvxCharacterMap, LoseFocusHdl, Control&, pItem, void) { diff --git a/cui/source/inc/cuicharmap.hxx b/cui/source/inc/cuicharmap.hxx index b1a06b4540e3..7e2619efc10b 100644 --- a/cui/source/inc/cuicharmap.hxx +++ b/cui/source/inc/cuicharmap.hxx @@ -78,6 +78,8 @@ private: VclPtr<FixedText> m_pSubsetText; VclPtr<ListBox> m_pSubsetLB; VclPtr<SvxShowText> m_pShowChar; + VclPtr<CheckBox> m_pDrawChk; + VclPtr<vcl::Window> m_pDrawingArea; VclPtr<Edit> m_pSearchText; VclPtr<Edit> m_pHexCodeText; VclPtr<Edit> m_pDecimalCodeText; @@ -105,6 +107,7 @@ private: DECL_LINK(SubsetSelectHdl, ListBox&, void); DECL_LINK(CharDoubleClickHdl, SvxShowCharSet*,void); DECL_LINK(CharSelectHdl, SvxShowCharSet*, void); + DECL_LINK(DrawToggleHdl, Button*, void); DECL_LINK(CharHighlightHdl, SvxShowCharSet*, void); DECL_LINK(CharPreSelectHdl, SvxShowCharSet*, void); DECL_LINK(FavClickHdl, SvxShowCharSet*,void); commit c61d6a88c0f991b70c4bf19466eb671523f84aae Author: Vincent Le Garrec <legarrec.vinc...@gmail.com> Date: Mon Jan 15 23:16:41 2018 +0100 Add draw functions to specialchar ui Change-Id: I6b732127cdd48b5e0acf8c409d586426d9b13c8e diff --git a/cui/uiconfig/ui/specialcharacters.ui b/cui/uiconfig/ui/specialcharacters.ui index 09a18b37b90a..ca21156de36c 100644 --- a/cui/uiconfig/ui/specialcharacters.ui +++ b/cui/uiconfig/ui/specialcharacters.ui @@ -202,6 +202,22 @@ </packing> </child> <child> + <object class="GtkDrawingArea" id="drawingarea"> + <property name="width_request">80</property> + <property name="height_request">150</property> + <property name="visible">False</property> + <property name="can_focus">True</property> + <property name="hexpand">True</property> + <property name="vexpand">True</property> + </object> + <packing> + <property name="expand">False</property> + <property name="fill">True</property> + <property name="left_attach">0</property> + <property name="top_attach">1</property> + </packing> + </child> + <child> <object class="GtkTextView" id="charname"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -212,7 +228,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -224,6 +240,23 @@ <property name="column_spacing">6</property> <property name="row_homogeneous">True</property> <child> + <object class="GtkCheckButton" id="drawcheckbutton"> + <property name="label" translatable="yes" context="specialcharacters|drawcheckbutton">Draw</property> + <property name="visible">True</property> + <property name="can_focus">True</property> + <property name="receives_default">False</property> + <property name="use_underline">True</property> + <property name="halign">start</property> + <property name="xalign">0</property> + <property name="draw_indicator">True</property> + </object> + <packing> + <property name="left_attach">0</property> + <property name="top_attach">0</property> + <property name="width">2</property> + </packing> + </child> + <child> <object class="GtkLabel" id="hexlabel"> <property name="visible">True</property> <property name="can_focus">False</property> @@ -233,7 +266,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">0</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -272,7 +305,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">0</property> + <property name="top_attach">1</property> </packing> </child> <child> @@ -284,7 +317,7 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -296,7 +329,7 @@ </object> <packing> <property name="left_attach">1</property> - <property name="top_attach">1</property> + <property name="top_attach">2</property> </packing> </child> <child> @@ -310,14 +343,14 @@ </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> <property name="width">2</property> </packing> </child> </object> <packing> <property name="left_attach">0</property> - <property name="top_attach">2</property> + <property name="top_attach">3</property> </packing> </child> </object> _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits