summaryrefslogtreecommitdiff
path: root/cui/source/inc
diff options
context:
space:
mode:
authorMuhammet Kara <muhammet.kara@pardus.org.tr>2017-08-04 20:03:47 +0300
committerKatarina Behrens <Katarina.Behrens@cib.de>2017-09-04 22:39:46 +0200
commit283280ec542883d65cc97d4228434003a01be3e9 (patch)
treee2b8e2c76bf9dfc38e4ced22842300f683649774 /cui/source/inc
parentd69f9436b59e249af8dcac88ccadf09b920b1bab (diff)
Add custom widget class: CommandCategoryListBox
It now lists all command categories which can be added based on the current module (writer, calc etc.) This class will be expanded later with macros and styles handling stuff. It will also update the commands listbox when it is added. Change-Id: I4f50408641db067118f63fe0e9a1ee755873412f Reviewed-on: https://gerrit.libreoffice.org/40833 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Katarina Behrens <Katarina.Behrens@cib.de>
Diffstat (limited to 'cui/source/inc')
-rw-r--r--cui/source/inc/CommandCategoryListBox.hxx47
-rw-r--r--cui/source/inc/cfg.hxx2
2 files changed, 49 insertions, 0 deletions
diff --git a/cui/source/inc/CommandCategoryListBox.hxx b/cui/source/inc/CommandCategoryListBox.hxx
new file mode 100644
index 000000000000..19138b6ceb77
--- /dev/null
+++ b/cui/source/inc/CommandCategoryListBox.hxx
@@ -0,0 +1,47 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4; fill-column: 100 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ *
+ * This file incorporates work covered by the following license notice:
+ *
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed
+ * with this work for additional information regarding copyright
+ * ownership. The ASF licenses this file to you under the Apache
+ * License, Version 2.0 (the "License"); you may not use this file
+ * except in compliance with the License. You may obtain a copy of
+ * the License at http://www.apache.org/licenses/LICENSE-2.0 .
+ */
+#ifndef INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
+#define INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
+
+#include <vcl/lstbox.hxx>
+#include "cfgutil.hxx"
+
+class CommandCategoryListBox : public ListBox
+{
+ SfxGroupInfoArr_Impl m_aGroupInfo;
+ OUString m_sModuleLongName;
+ css::uno::Reference< css::uno::XComponentContext > m_xContext;
+ css::uno::Reference< css::frame::XFrame > m_xFrame;
+ css::uno::Reference< css::container::XNameAccess > m_xGlobalCategoryInfo;
+ css::uno::Reference< css::container::XNameAccess > m_xModuleCategoryInfo;
+
+public:
+ CommandCategoryListBox( vcl::Window* pParent, WinBits nBits = WB_BORDER | WB_DROPDOWN );
+
+ void Init(
+ const css::uno::Reference< css::uno::XComponentContext >& xContext,
+ const css::uno::Reference< css::frame::XFrame >& xFrame,
+ const OUString& sModuleLongName);
+
+ void ClearAll();
+};
+
+#endif // INCLUDED_CUI_SOURCE_INC_COMMANDCATEGORYLISTBOX_HXX
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab cinoptions=b1,g0,N-s cinkeys+=0=break: */
diff --git a/cui/source/inc/cfg.hxx b/cui/source/inc/cfg.hxx
index 626445602213..843057131fc6 100644
--- a/cui/source/inc/cfg.hxx
+++ b/cui/source/inc/cfg.hxx
@@ -54,6 +54,7 @@
#include <vcl/msgbox.hxx>
#include "cfgutil.hxx"
+#include "CommandCategoryListBox.hxx"
static const char ITEM_DESCRIPTOR_COMMANDURL[] = "CommandURL";
static const char ITEM_DESCRIPTOR_CONTAINER[] = "ItemDescriptorContainer";
@@ -384,6 +385,7 @@ protected:
// the top section of the tab page where top level menus and toolbars
// are displayed in a listbox
VclPtr<ListBox> m_pTopLevelListBox;
+ VclPtr<CommandCategoryListBox> m_pCommandCategoryListBox;
// the contents section where the contents of the selected
// menu or toolbar are displayed