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

convert help contents page to .ui

Change-Id: I9ffd2881bfbf51749d69d7fc1af2d74335d8e3f4
üst 3991641a
...@@ -472,6 +472,9 @@ ...@@ -472,6 +472,9 @@
<glade-widget-class title="Chart Series ListBox" name="chartcontrollerlo-SeriesListBox" <glade-widget-class title="Chart Series ListBox" name="chartcontrollerlo-SeriesListBox"
generic-name="Chart Series ListBox" parent="svtlo-SvTreeListBox" generic-name="Chart Series ListBox" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>
<glade-widget-class title="Content List Box" name="sfxlo-ContentListBox"
generic-name="Content List Box" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/>
<glade-widget-class title="DD ListBox" name="swuilo-DDListBox" <glade-widget-class title="DD ListBox" name="swuilo-DDListBox"
generic-name="DD ListBox" parent="svtlo-SvTreeListBox" generic-name="DD ListBox" parent="svtlo-SvTreeListBox"
icon-name="widget-gtk-treeview"/> icon-name="widget-gtk-treeview"/>
......
...@@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\ ...@@ -23,6 +23,7 @@ $(eval $(call gb_UIConfig_add_uifiles,sfx,\
sfx2/uiconfig/ui/editdurationdialog \ sfx2/uiconfig/ui/editdurationdialog \
sfx2/uiconfig/ui/errorfindemaildialog \ sfx2/uiconfig/ui/errorfindemaildialog \
sfx2/uiconfig/ui/helpbookmarkpage \ sfx2/uiconfig/ui/helpbookmarkpage \
sfx2/uiconfig/ui/helpcontentpage \
sfx2/uiconfig/ui/helpindexpage \ sfx2/uiconfig/ui/helpindexpage \
sfx2/uiconfig/ui/helpsearchpage \ sfx2/uiconfig/ui/helpsearchpage \
sfx2/uiconfig/ui/inputdialog \ sfx2/uiconfig/ui/inputdialog \
......
...@@ -42,7 +42,6 @@ ...@@ -42,7 +42,6 @@
#define CONFIG_PATH_START (RID_SFX_APP_START+98) #define CONFIG_PATH_START (RID_SFX_APP_START+98)
#define WIN_HELPINDEX (RID_SFX_APP_START+99) #define WIN_HELPINDEX (RID_SFX_APP_START+99)
#define TP_HELP_CONTENT (RID_SFX_APP_START+100)
#define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105) #define MENU_HELP_BOOKMARKS (RID_SFX_APP_START+105)
#define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106) #define RID_INFO_NOSEARCHRESULTS (RID_SFX_APP_START+106)
......
...@@ -270,13 +270,11 @@ struct ContentEntry_Impl ...@@ -270,13 +270,11 @@ struct ContentEntry_Impl
// ContentListBox_Impl --------------------------------------------------- // ContentListBox_Impl ---------------------------------------------------
ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) : ContentListBox_Impl::ContentListBox_Impl(Window* pParent, WinBits nStyle)
: SvTreeListBox(pParent, nStyle)
SvTreeListBox( pParent, rResId ), , aOpenBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_OPEN))
, aClosedBookImage(SfxResId(IMG_HELP_CONTENT_BOOK_CLOSED))
aOpenBookImage ( SfxResId( IMG_HELP_CONTENT_BOOK_OPEN ) ), , aDocumentImage(SfxResId(IMG_HELP_CONTENT_DOC))
aClosedBookImage ( SfxResId( IMG_HELP_CONTENT_BOOK_CLOSED ) ),
aDocumentImage ( SfxResId( IMG_HELP_CONTENT_DOC ) )
{ {
SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL ); SetStyle( GetStyle() | WB_HIDESELECTION | WB_HSCROLL );
...@@ -292,7 +290,15 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId ) ...@@ -292,7 +290,15 @@ ContentListBox_Impl::ContentListBox_Impl( Window* pParent, const ResId& rResId )
InitRoot(); InitRoot();
} }
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeContentListBox(Window *pParent,
VclBuilder::stringmap &rMap)
{
WinBits nWinStyle = WB_TABSTOP;
OString sBorder = VclBuilder::extractCustomProperty(rMap);
if (!sBorder.isEmpty())
nWinStyle |= WB_BORDER;
return new ContentListBox_Impl(pParent, nWinStyle);
}
ContentListBox_Impl::~ContentListBox_Impl() ContentListBox_Impl::~ContentListBox_Impl()
{ {
...@@ -306,8 +312,6 @@ ContentListBox_Impl::~ContentListBox_Impl() ...@@ -306,8 +312,6 @@ ContentListBox_Impl::~ContentListBox_Impl()
} }
} }
void ContentListBox_Impl::InitRoot() void ContentListBox_Impl::InitRoot()
{ {
OUString aHelpTreeviewURL( "vnd.sun.star.hier://com.sun.star.help.TreeView/" ); OUString aHelpTreeviewURL( "vnd.sun.star.hier://com.sun.star.help.TreeView/" );
...@@ -431,41 +435,25 @@ HelpTabPage_Impl::HelpTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pI ...@@ -431,41 +435,25 @@ HelpTabPage_Impl::HelpTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pI
// class ContentTabPage_Impl --------------------------------------------- // class ContentTabPage_Impl ---------------------------------------------
ContentTabPage_Impl::ContentTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin ) : ContentTabPage_Impl::ContentTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin)
: HelpTabPage_Impl(pParent, _pIdxWin, "HelpContentPage",
HelpTabPage_Impl( pParent, _pIdxWin, SfxResId( TP_HELP_CONTENT ) ), "sfx/ui/helpcontentpage.ui")
aContentBox( this, SfxResId( LB_CONTENTS ) )
{ {
FreeResource(); get(m_pContentBox, "content");
Size aSize(LogicToPixel(Size(108 , 188), MAP_APPFONT));
aContentBox.Show(); m_pContentBox->set_width_request(aSize.Width());
} m_pContentBox->set_height_request(aSize.Height());
void ContentTabPage_Impl::Resize()
{
Size aSize = GetOutputSizePixel();
aSize.Width() -= 8;
aSize.Height() -= 8;
aContentBox.SetPosSizePixel( Point( 4, 4 ), aSize );
} }
void ContentTabPage_Impl::ActivatePage() void ContentTabPage_Impl::ActivatePage()
{ {
if ( !m_pIdxWin->WasCursorLeftOrRight() ) if ( !m_pIdxWin->WasCursorLeftOrRight() )
SetFocusOnBox(); SetFocusOnBox();
} }
Control* ContentTabPage_Impl::GetLastFocusControl() Control* ContentTabPage_Impl::GetLastFocusControl()
{ {
return &aContentBox; return m_pContentBox;
} }
// class IndexBox_Impl --------------------------------------------------- // class IndexBox_Impl ---------------------------------------------------
......
...@@ -26,9 +26,6 @@ ...@@ -26,9 +26,6 @@
#define FL_ACTIVE 11 #define FL_ACTIVE 11
#define TC_INDEX 12 #define TC_INDEX 12
// Content TabPage
#define LB_CONTENTS 10
// Index Window: Id's of the tabpages // Index Window: Id's of the tabpages
#define HELP_INDEX_PAGE_FIRST 1 #define HELP_INDEX_PAGE_FIRST 1
#define HELP_INDEX_PAGE_CONTENTS HELP_INDEX_PAGE_FIRST #define HELP_INDEX_PAGE_CONTENTS HELP_INDEX_PAGE_FIRST
......
...@@ -57,7 +57,7 @@ private: ...@@ -57,7 +57,7 @@ private:
void ClearChildren( SvTreeListEntry* pParent ); void ClearChildren( SvTreeListEntry* pParent );
public: public:
ContentListBox_Impl( Window* pParent, const ResId& rResId ); ContentListBox_Impl(Window* pParent, WinBits nStyle);
~ContentListBox_Impl(); ~ContentListBox_Impl();
...@@ -90,18 +90,17 @@ public: ...@@ -90,18 +90,17 @@ public:
class ContentTabPage_Impl : public HelpTabPage_Impl class ContentTabPage_Impl : public HelpTabPage_Impl
{ {
private: private:
ContentListBox_Impl aContentBox; ContentListBox_Impl* m_pContentBox;
public: public:
ContentTabPage_Impl( Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin ); ContentTabPage_Impl(Window* pParent, SfxHelpIndexWindow_Impl* _pIdxWin);
virtual void Resize();
virtual void ActivatePage(); virtual void ActivatePage();
virtual Control* GetLastFocusControl(); virtual Control* GetLastFocusControl();
inline void SetOpenHdl( const Link& rLink ) { aContentBox.SetOpenHdl( rLink ); } void SetOpenHdl( const Link& rLink ) { m_pContentBox->SetOpenHdl( rLink ); }
inline OUString GetSelectEntry() const { return aContentBox.GetSelectEntry(); } OUString GetSelectEntry() const { return m_pContentBox->GetSelectEntry(); }
inline void SetFocusOnBox() { aContentBox.GrabFocus(); } void SetFocusOnBox() { m_pContentBox->GrabFocus(); }
}; };
// class IndexTabPage_Impl ----------------------------------------------- // class IndexTabPage_Impl -----------------------------------------------
......
...@@ -71,22 +71,6 @@ Window WIN_HELPINDEX ...@@ -71,22 +71,6 @@ Window WIN_HELPINDEX
}; };
}; };
TabPage TP_HELP_CONTENT
{
HelpId = HID_HELP_TABPAGE_CONTENTS;
Hide = TRUE ;
DialogControl = TRUE;
Size = MAP_APPFONT ( 120 , 200 ) ;
Control LB_CONTENTS
{
HelpId = HID_HELP_TREELISTBOX_CONTENTS ;
Border = TRUE ;
TabStop = TRUE;
Pos = MAP_APPFONT ( 6 , 6 ) ;
Size = MAP_APPFONT ( 108 , 188 ) ;
};
};
#define MASKCOLOR_MAGENTA \ #define MASKCOLOR_MAGENTA \
MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; }; MaskColor = Color { Red = 0xFFFF ; Green = 0x0000 ; Blue = 0xFFFF ; };
......
...@@ -104,7 +104,6 @@ ...@@ -104,7 +104,6 @@
#define HID_HELP_TOOLBOXITEM_FORWARD "SFX2_HID_HELP_TOOLBOXITEM_FORWARD" #define HID_HELP_TOOLBOXITEM_FORWARD "SFX2_HID_HELP_TOOLBOXITEM_FORWARD"
#define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT" #define HID_HELP_TOOLBOXITEM_PRINT "SFX2_HID_HELP_TOOLBOXITEM_PRINT"
#define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS" #define HID_HELP_TOOLBOXITEM_BOOKMARKS "SFX2_HID_HELP_TOOLBOXITEM_BOOKMARKS"
#define HID_HELP_TABPAGE_CONTENTS "SFX2_HID_HELP_TABPAGE_CONTENTS"
#define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW" #define HID_TBXCONTROL_FILENEW "SFX2_HID_TBXCONTROL_FILENEW"
#define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG" #define HID_HELP_TOOLBOXITEM_SEARCHDIALOG "SFX2_HID_HELP_TOOLBOXITEM_SEARCHDIALOG"
#define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN" #define HID_HELP_BOOKMARKS_OPEN "SFX2_HID_HELP_BOOKMARKS_OPEN"
...@@ -112,7 +111,6 @@ ...@@ -112,7 +111,6 @@
#define HID_HELP_BOOKMARKS_DELETE "SFX2_HID_HELP_BOOKMARKS_DELETE" #define HID_HELP_BOOKMARKS_DELETE "SFX2_HID_HELP_BOOKMARKS_DELETE"
#define HID_CLOSE_WARNING "SFX2_HID_CLOSE_WARNING" #define HID_CLOSE_WARNING "SFX2_HID_CLOSE_WARNING"
#define HID_DID_SAVE_PACKED_XML "SFX2_HID_DID_SAVE_PACKED_XML" #define HID_DID_SAVE_PACKED_XML "SFX2_HID_DID_SAVE_PACKED_XML"
#define HID_HELP_TREELISTBOX_CONTENTS "SFX2_HID_HELP_TREELISTBOX_CONTENTS"
#define HID_HELP_TEXT_SELECTION_MODE "SFX2_HID_HELP_TEXT_SELECTION_MODE" #define HID_HELP_TEXT_SELECTION_MODE "SFX2_HID_HELP_TEXT_SELECTION_MODE"
#define HID_WARNING_SECURITY_HYPERLINK "SFX2_HID_WARNING_SECURITY_HYPERLINK" #define HID_WARNING_SECURITY_HYPERLINK "SFX2_HID_WARNING_SECURITY_HYPERLINK"
......
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.16.1 -->
<interface>
<requires lib="gtk+" version="3.0"/>
<!-- interface-requires LibreOffice 1.0 -->
<object class="GtkBox" id="HelpContentPage">
<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="orientation">vertical</property>
<child>
<object class="GtkGrid" id="grid1">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="hexpand">True</property>
<property name="vexpand">True</property>
<property name="row_spacing">6</property>
<child>
<object class="sfxlo-ContentListBox" id="content: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="Content List Box-selection1"/>
</child>
</object>
<packing>
<property name="left_attach">0</property>
<property name="top_attach">0</property>
<property name="width">1</property>
<property name="height">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">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