Kaydet (Commit) 4dc6e29d authored tarafından Caolán McNamara's avatar Caolán McNamara

convert impress/draw navigator to .ui

Change-Id: I75164f6878f53dc1382f3802b594914b1637e545
üst 0bd4ae07
......@@ -34,7 +34,6 @@ $(eval $(call gb_SrsTarget_add_files,sd/res,\
sd/source/ui/app/sdstring.src \
sd/source/ui/app/strings.src \
sd/source/ui/app/toolbox.src \
sd/source/ui/dlg/navigatr.src \
sd/source/ui/slideshow/slideshow.src \
sd/source/ui/view/DocumentRenderer.src \
))
......
......@@ -120,6 +120,7 @@ $(eval $(call gb_UIConfig_add_uifiles,modules/simpress,\
sd/uiconfig/simpress/ui/interactiondialog \
sd/uiconfig/simpress/ui/interactionpage \
sd/uiconfig/simpress/ui/masterlayoutdlg \
sd/uiconfig/simpress/ui/navigatorpanel \
sd/uiconfig/simpress/ui/notebookbar \
sd/uiconfig/simpress/ui/optimpressgeneralpage \
sd/uiconfig/simpress/ui/photoalbum \
......
......@@ -23,17 +23,6 @@
#define HID_SDDRAWVIEWSHELL "SD_HID_SDDRAWVIEWSHELL"
#define HID_SDGRAPHICVIEWSHELL "SD_HID_SDGRAPHICVIEWSHELL"
#define HID_SDOUTLINEVIEWSHELL "SD_HID_SDOUTLINEVIEWSHELL"
#define HID_SD_WIN_DOCUMENT "SD_HID_SD_WIN_DOCUMENT"
#define HID_SD_NAVIGATOR_TLB "SD_HID_SD_NAVIGATOR_TLB"
#define HID_SD_NAVIGATOR "SD_HID_SD_NAVIGATOR"
#define HID_SD_NAVIGATOR_TBX "SD_HID_SD_NAVIGATOR_TBX"
#define HID_SD_NAVIGATOR_LB "SD_HID_SD_NAVIGATOR_LB"
#define HID_SD_NAVIGATOR_TBI_FIRST "SD_HID_SD_NAVIGATOR_TBI_FIRST"
#define HID_SD_NAVIGATOR_TBI_PREV "SD_HID_SD_NAVIGATOR_TBI_PREV"
#define HID_SD_NAVIGATOR_TBI_NEXT "SD_HID_SD_NAVIGATOR_TBI_NEXT"
#define HID_SD_NAVIGATOR_TBI_LAST "SD_HID_SD_NAVIGATOR_TBI_LAST"
#define HID_SD_NAVIGATOR_TBI_DRAGTYPE "SD_HID_SD_NAVIGATOR_TBI_DRAGTYPE"
#define HID_SD_NAVIGATOR_TBI_SHAPE_FILTER "SD_HID_SD_NAVIGATOR_TBI_SHAPE_FILTER"
// tool boxes
#define HID_SD_DRAW_TOOLBOX "SD_HID_SD_DRAW_TOOLBOX"
......
......@@ -857,4 +857,28 @@ Bitmap BMP_PRESENTATION_MINIMIZER
File = "minimize_presi_80.png";
};
Image IMG_EMBEDDED
{
ImageBitmap = Bitmap
{
File = "nv08.png" ;
};
};
Image IMG_LINK
{
ImageBitmap = Bitmap
{
File = "nv09.png" ;
};
};
Image IMG_HYPERLINK
{
ImageBitmap = Bitmap
{
File = "nv010.png" ;
};
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -1257,4 +1257,9 @@ String STR_INSERT_3D_MODEL_ALL_SUPPORTED_FORMATS
Text [ en-US ] = "All supported formats";
};
String STR_OBJECTS_TREE
{
Text [ en-US ] = "Page Tree";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -20,10 +20,10 @@
#include "NavigatorChildWindow.hxx"
#include "navigatr.hxx"
#include "app.hrc"
#include "navigatr.hrc"
#include <sfx2/app.hxx>
#include <sfx2/bindings.hxx>
#include <sfx2/dispatch.hxx>
#include <sfx2/navigat.hxx>
#include <svl/eitem.hxx>
namespace sd {
......@@ -56,6 +56,9 @@ NavigatorChildWindow::NavigatorChildWindow (
pNavWin->SetUpdateRequestFunctor(
[pBindings] () { return RequestNavigatorUpdate(pBindings); });
if (SfxNavigator* pNav = dynamic_cast<SfxNavigator*>(pParent))
pNav->SetMinOutputSizePixel(pNavWin->GetOptimalSize());
SetWindow( pNavWin );
}
......
This diff is collapsed.
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#include "navigatr.hrc"
#include "helpids.h"
#include "res_bmp.hrc"
#define BUTTON_WIDTH 13
#define BUTTON_COUNT 7
Window FLT_NAVIGATOR
{
HelpId = HID_SD_NAVIGATOR ;
Size = MAP_APPFONT ( 12 + BUTTON_WIDTH * BUTTON_COUNT , 105 ) ;
Text = "Navigator" ;
SVLook = TRUE ;
DialogControl = TRUE;
Control TLB_OBJECTS
{
HelpId = HID_SD_NAVIGATOR_TLB ;
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 20 ) ;
Size = MAP_APPFONT ( 6 + BUTTON_WIDTH * BUTTON_COUNT , 67 ) ;
TabStop = TRUE ;
};
ToolBox 1
{
HelpId = HID_SD_NAVIGATOR_TBX ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 3 , 3 ) ;
Size = MAP_APPFONT ( 6 + BUTTON_WIDTH , 15 ) ;
TabStop = TRUE ;
ItemList =
{
ToolBoxItem
{
Identifier = TBI_FIRST ;
HelpId = HID_SD_NAVIGATOR_TBI_FIRST ;
Text [ en-US ] = "First Slide" ;
};
ToolBoxItem
{
Identifier = TBI_PREVIOUS ;
HelpId = HID_SD_NAVIGATOR_TBI_PREV ;
Text [ en-US ] = "Previous Slide" ;
};
ToolBoxItem
{
Identifier = TBI_NEXT ;
HelpId = HID_SD_NAVIGATOR_TBI_NEXT ;
Text [ en-US ] = "Next Slide" ;
};
ToolBoxItem
{
Identifier = TBI_LAST ;
HelpId = HID_SD_NAVIGATOR_TBI_LAST ;
Text [ en-US ] = "Last Slide" ;
};
ToolBoxItem
{
Type = TOOLBOXITEM_SEPARATOR ;
};
ToolBoxItem
{
Identifier = TBI_DRAGTYPE ;
HelpId = HID_SD_NAVIGATOR_TBI_DRAGTYPE ;
DropDown = TRUE ;
Text [ en-US ] = "Drag Mode" ;
};
ToolBoxItem
{
Identifier = TBI_SHAPE_FILTER ;
HelpId = HID_SD_NAVIGATOR_TBI_SHAPE_FILTER ;
DropDown = TRUE ;
Text [ en-US ] = "Show Shapes" ;
};
};
};
ListBox LB_DOCS
{
HelpId = HID_SD_NAVIGATOR_LB ;
Border = TRUE ;
Pos = MAP_APPFONT ( 3 , 89 ) ;
Size = MAP_APPFONT ( 6 + BUTTON_WIDTH * BUTTON_COUNT , 90 ) ;
TabStop = TRUE ;
DropDown = TRUE ;
QuickHelpText [ en-US ] = "Documents" ;
};
#define NAVIGATR_IDLIST \
IdList = \
{ \
TBI_FIRST ; \
TBI_PREVIOUS ; \
TBI_NEXT ; \
TBI_LAST ; \
TBI_EMBEDDED ; \
TBI_LINK ; \
TBI_HYPERLINK ; \
}; \
IdCount = { 8 ; };
#define IMAGE_STDBTN_COLOR Color { Red = 0xff00; Green = 0x0000; Blue = 0xff00; }
ImageList IL_NAVIGATR
{
Prefix = "nv";
NAVIGATR_IDLIST
};
};
String STR_OBJECTS_TREE
{
Text [ en-US ] = "Page Tree";
};
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -192,37 +192,6 @@ SotClipboardFormatId SdPageObjsTLB::SdPageObjsTransferable::GetListBoxDropFormat
return mnListBoxDropFormatId;
}
SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, const SdResId& rSdResId )
: SvTreeListBox ( pParentWin, rSdResId )
, bisInSdNavigatorWin ( false )
, mpParent ( pParentWin )
, mpDoc ( nullptr )
, mpBookmarkDoc ( nullptr )
, mpMedium ( nullptr )
, mpOwnMedium ( nullptr )
, maImgOle ( BitmapEx( SdResId( BMP_OLE ) ) )
, maImgGraphic ( BitmapEx( SdResId( BMP_GRAPHIC ) ) )
, mbLinkableSelected ( false )
, mpDropNavWin ( nullptr )
, mpFrame ( nullptr )
, mbSaveTreeItemState ( false )
, mbShowAllShapes ( false )
, mbShowAllPages ( false )
{
// add lines to Tree-ListBox
SetStyle( GetStyle() | WB_TABSTOP | WB_BORDER | WB_HASLINES |
WB_HASBUTTONS | // WB_HASLINESATROOT |
WB_HSCROLL |
WB_HASBUTTONSATROOT |
WB_QUICK_SEARCH /* i31275 */ );
SetNodeBitmaps( Image(Bitmap( SdResId(BMP_EXPAND) )),
Image(Bitmap( SdResId(BMP_COLLAPSE) )));
SetDragDropMode(
DragDropMode::CTRL_MOVE | DragDropMode::CTRL_COPY |
DragDropMode::APP_MOVE | DragDropMode::APP_COPY | DragDropMode::APP_DROP );
}
SdPageObjsTLB::SdPageObjsTLB( vcl::Window* pParentWin, WinBits nStyle )
: SvTreeListBox ( pParentWin, nStyle )
, bisInSdNavigatorWin ( false )
......
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/*
* 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 .
*/
#define FLT_NAVIGATOR 575
#define STR_OBJECTS_TREE (FLT_NAVIGATOR+1)
#define TLB_OBJECTS 1
#define TBI_FIRST 3
#define TBI_PREVIOUS 4
#define TBI_NEXT 5
#define TBI_LAST 6
#define TBI_DRAGTYPE 7
#define TBI_EMBEDDED 8
#define TBI_LINK 9
#define TBI_HYPERLINK 10
#define TBI_SHAPE_FILTER 11
#define LB_DOCS 1
#define IL_NAVIGATR 333
#define STR_DRAGMODE 1
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -24,6 +24,7 @@
#include <vcl/lstbox.hxx>
#include <vcl/toolbox.hxx>
#include <sfx2/ctrlitem.hxx>
#include <svx/sidebar/PanelLayout.hxx>
#include "sdtreelb.hxx"
#include "pres.hxx"
......@@ -75,8 +76,7 @@ private:
::sd::DrawDocShell* mpDocShell;
};
class SdNavigatorWin
: public vcl::Window
class SdNavigatorWin : public PanelLayout
{
public:
typedef ::std::function<void ()> UpdateRequestFunctor;
......@@ -103,7 +103,6 @@ public:
NavigatorDragType GetNavigatorDragType();
protected:
virtual void Resize() override;
virtual bool Notify(NotifyEvent& rNEvt) override;
private:
......@@ -115,8 +114,6 @@ private:
VclPtr<SdPageObjsTLB> maTlbObjects;
VclPtr<ListBox> maLbDocs;
Size maSize;
Size maMinSize;
bool mbDocImported;
OUString maDropFileName;
NavigatorDragType meDragType;
......@@ -125,8 +122,6 @@ private:
SdNavigatorControllerItem* mpNavigatorCtrlItem;
SdPageNameControllerItem* mpPageNameCtrlItem;
ImageList maImageList;
/** This flag controls whether all shapes or only the named shapes are
shown.
*/
......@@ -142,9 +137,8 @@ private:
DECL_LINK( MenuSelectHdl, Menu *, bool );
DECL_LINK( ShapeFilterCallback, Menu *, bool );
virtual void DataChanged( const DataChangedEvent& rDCEvt ) override;
void SetDragImage();
void ApplyImageList();
public:
//when object is marked , fresh the corresponding entry tree .
static sd::DrawDocShell* GetDrawDocShell(const SdDrawDocument*);
......
......@@ -209,4 +209,8 @@
#define RID_GRAPHICSTYLEFAMILY RID_APP_START+395
#define RID_PRESENTATIONSTYLEFAMILY RID_APP_START+396
#define IMG_EMBEDDED RID_APP_START+397
#define IMG_LINK RID_APP_START+398
#define IMG_HYPERLINK RID_APP_START+399
/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
......@@ -181,8 +181,7 @@ protected:
public:
SdPageObjsTLB( vcl::Window* pParent, const SdResId& rSdResId );
SdPageObjsTLB( vcl::Window* pParent, WinBits nStyle );
SdPageObjsTLB(vcl::Window* pParent, WinBits nStyle);
virtual ~SdPageObjsTLB() override;
virtual void dispose() override;
......
......@@ -392,8 +392,7 @@
#define STR_TASKPANEL_PREPARING_PREVIEW_SUBSTITUTION (RID_APP_START+712)
#define STR_TASKPANEL_LAYOUT_MENU_TITLE (RID_APP_START+713)
#define STR_GRAPHICS_STYLE_FAMILY (RID_APP_START+715)
// free
#define STR_OBJECTS_TREE (RID_APP_START+716)
#define STR_CELL_STYLE_FAMILY (RID_APP_START+717)
#define STR_NAVIGATOR_SHOW_NAMED_SHAPES (RID_APP_START+718)
......
......@@ -18,7 +18,6 @@
*/
#include "NavigatorWrapper.hxx"
#include "navigatr.hrc"
#include "ViewShellBase.hxx"
#include <sfx2/sidebar/Theme.hxx>
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.20.0 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<object class="GtkGrid" id="NavigatorPanel">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="border_width">6</property>
<child>
<object class="GtkGrid">
<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="row_spacing">6</property>
<property name="column_spacing">12</property>
<child>
<object class="GtkComboBox" id="documents">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Document</property>
<child internal-child="accessible">
<object class="AtkObject" id="documents-atkobject">
<property name="AtkObject::accessible-name" translatable="yes">Active Window</property>
</object>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">2</property>
</packing>
</child>
<child>
<object class="sdlo-SdPageObjsTLB" id="tree:border">
<property name="visible">True</property>
<property name="can_focus">True</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<child internal-child="selection">
<object class="GtkTreeSelection" id="SdPageObjsTLB-selection1"/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">1</property>
</packing>
</child>
<child>
<object class="GtkToolbar" id="toolbox">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="toolbar_style">icons</property>
<child>
<object class="GtkToolButton" id="first">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">First Slide</property>
<property name="action_name">first</property>
<property name="icon_name">sd/imglst/nv03.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="previous">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Previous Slide</property>
<property name="action_name">previous</property>
<property name="icon_name">sd/imglst/nv04.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="next">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Next Slide</property>
<property name="action_name">next</property>
<property name="icon_name">sd/imglst/nv05.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkToolButton" id="last">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Last Slide</property>
<property name="action_name">last</property>
<property name="icon_name">sd/imglst/nv06.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkSeparatorToolItem" id="separator">
<property name="visible">True</property>
<property name="can_focus">False</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuToolButton" id="dragmode">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Drag Mode</property>
<property name="action_name">dragmode</property>
<property name="icon_name">sc/imglst/na09.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
<child>
<object class="GtkMenuToolButton" id="shapes">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="tooltip_text" translatable="yes">Show Shapes</property>
<property name="action_name">shapes</property>
<property name="icon_name">sd/res/graphic.png</property>
</object>
<packing>
<property name="expand">False</property>
<property name="homogeneous">True</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
</packing>
</child>
</object>
</interface>
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