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

convert basic dialog to .ui

Change-Id: I1ed45e5990aca4be8b499fe300d7d43fda16bd6a
üst bce042ca
......@@ -39,6 +39,7 @@ endif
$(eval $(call gb_Module_add_targets,basctl,\
Package_uiconfig \
UI_basicide \
))
# vim: set noet sw=4 ts=4:
# -*- Mode: makefile-gmake; tab-width: 4; indent-tabs-mode: t -*-
#
# 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/.
#
$(eval $(call gb_UI_UI,modules/BasicIDE))
$(eval $(call gb_UI_add_uifiles,modules/BasicIDE,\
basctl/uiconfig/basicide/ui/basicmacrodialog \
))
# vim: set noet sw=4 ts=4:
......@@ -69,10 +69,10 @@
#define RID_STR_RUNTIMEERROR ( RID_BASICIDE_START + 22 )
#define RID_STR_COMPILEERROR ( RID_BASICIDE_START + 23 )
#define RID_STR_STDDIALOGNAME ( RID_BASICIDE_START + 24 )
#define RID_STR_STDMACRONAME ( RID_BASICIDE_START + 25 )
#define RID_STR_STDMODULENAME ( RID_BASICIDE_START + 27 )
#define RID_STR_ALL ( RID_BASICIDE_START + 28 )
#define RID_STR_CLOSE ( RID_BASICIDE_START + 29 )
#define RID_STR_PAGE ( RID_BASICIDE_START + 30 )
#define RID_STR_BADSBXNAME ( RID_BASICIDE_START + 31 )
#define RID_STR_STDLIBNAME ( RID_BASICIDE_START + 32 )
......
......@@ -20,7 +20,8 @@
#include <memory>
#include "vcl/bitmap.hxx"
#include <vcl/bitmap.hxx>
#include <vcl/builder.hxx>
#include "basidesh.hxx"
#include "iderdll.hxx"
......@@ -184,15 +185,32 @@ bool EntryDescriptor::operator == (EntryDescriptor const& rDesc) const
// ===========
//
TreeListBox::TreeListBox (Window* pParent, ResId const& rRes) :
SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) ),
m_aNotifier( *this )
TreeListBox::TreeListBox (Window* pParent, ResId const& rRes)
: SvTreeListBox( pParent, IDEResId( sal::static_int_cast<sal_uInt16>( rRes.GetId() ) ) )
, m_aNotifier( *this )
{
Init();
}
TreeListBox::TreeListBox (Window* pParent)
: SvTreeListBox(pParent)
, m_aNotifier( *this )
{
Init();
}
void TreeListBox::Init()
{
SetNodeDefaultImages();
SetSelectionMode( SINGLE_SELECTION );
nMode = 0xFF; // everything
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeTreeListBox(Window *pParent, VclBuilder::stringmap &)
{
return new TreeListBox(pParent);
}
TreeListBox::~TreeListBox ()
{
m_aNotifier.dispose();
......
......@@ -177,7 +177,7 @@ class TreeListBox : public SvTreeListBox, public DocumentEventListener
private:
sal_uInt16 nMode;
DocumentEventNotifier m_aNotifier;
void Init();
void SetEntryBitmaps( SvTreeListEntry * pEntry, const Image& rImage );
virtual void MouseButtonDown( const MouseEvent& rMEvt );
......@@ -205,7 +205,8 @@ protected:
virtual void onDocumentModeChanged( const ScriptDocument& _rDocument );
public:
TreeListBox( Window* pParent, const ResId& rRes );
TreeListBox(Window* pParent, const ResId& rRes);
TreeListBox(Window* pParent);
~TreeListBox();
void ScanEntry( const ScriptDocument& rDocument, LibraryLocation eLocation );
......
......@@ -20,31 +20,10 @@
#include <svl/solar.hrc>
#define RID_MACROCHOOSER ( RID_BASICIDE_START + 50 )
#define RID_STR_BTNDEL ( RID_BASICIDE_START + 51 )
#define RID_STR_BTNNEW ( RID_BASICIDE_START + 52 )
#define RID_STR_CHOOSE ( RID_BASICIDE_START + 53 )
#define RID_STR_RUN ( RID_BASICIDE_START + 54 )
#define RID_STR_RECORD ( RID_BASICIDE_START + 56 )
#define RID_CTRL_MACRO 1
#define RID_CTRL_LIB 2
#define RID_TXT_MACRONAME 3
#define RID_TXT_MACROFROM 4
#define RID_ED_MACRONAME 5
#define RID_TXT_DESCRIPTION 6
#define RID_PB_RUN 8
#define RID_PB_CLOSE 9
#define RID_PB_EDIT 10
#define RID_PB_ORG 11
#define RID_PB_DEL 12
#define RID_PB_ASSIGN 13
#define RID_PB_HELP 15
#define RID_ML_DESCRIPTION 16
#define RID_TXT_MACROSIN 17
#define RID_TXT_SAVEMACRO 18
#define RID_PB_NEWLIB 19
#define RID_PB_NEWMOD 20
#endif // BASCTL_MACRODLG_HRC
......@@ -49,24 +49,22 @@ public:
};
private:
FixedText aMacroNameTxt;
Edit aMacroNameEdit;
FixedText aMacroFromTxT;
FixedText aMacrosSaveInTxt;
TreeListBox aBasicBox;
FixedText aMacrosInTxt;
String aMacrosInTxtBaseStr;
SvTreeListBox aMacroBox;
PushButton aRunButton;
CancelButton aCloseButton;
PushButton aAssignButton;
PushButton aEditButton;
PushButton aNewDelButton;
PushButton aOrganizeButton;
HelpButton aHelpButton;
PushButton aNewLibButton;
PushButton aNewModButton;
Edit* m_pMacroNameEdit;
FixedText* m_pMacroFromTxT;
FixedText* m_pMacrosSaveInTxt;
TreeListBox* m_pBasicBox;
FixedText* m_pMacrosInTxt;
String m_aMacrosInTxtBaseStr;
SvTreeListBox* m_pMacroBox;
PushButton* m_pRunButton;
PushButton* m_pCloseButton;
PushButton* m_pAssignButton;
PushButton* m_pEditButton;
PushButton* m_pDelButton;
PushButton* m_pOrganizeButton;
PushButton* m_pNewLibButton;
PushButton* m_pNewModButton;
bool bNewDelIsDel;
bool bForceStoreBasic;
......
......@@ -20,156 +20,6 @@
#include <macrodlg.hrc>
#include <basidesh.hrc>
#include <helpid.hrc>
ModalDialog RID_MACROCHOOSER
{
HelpId = "basctl:ModalDialog:RID_MACROCHOOSER" ;
OutputSize = TRUE ;
SVLook = TRUE ;
Size = MAP_APPFONT ( 287 , 165 ) ;
Text [ en-US ] = "%PRODUCTNAME Basic Macros" ;
Moveable = TRUE ;
// Closeable = TRUE;
FixedText RID_TXT_MACROSIN
{
Pos = MAP_APPFONT ( 122 , 30 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Existing macros ~in:";
};
Control RID_CTRL_MACRO
{
HelpID = HID_BASICIDE_MACROS ;
Border = TRUE ;
Pos = MAP_APPFONT ( 122 , 41 ) ;
Size = MAP_APPFONT ( 100 , 117 ) ;
// Size = MAP_APPFONT ( 100 , 117 ) ;
TabStop = TRUE ;
};
Control RID_CTRL_LIB
{
HelpID = HID_BASICIDE_LIBS ;
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 41 ) ;
Size = MAP_APPFONT ( 110 , 117 ) ;
TabStop = TRUE ;
};
FixedText RID_TXT_MACRONAME
{
Pos = MAP_APPFONT ( 6 , 3 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "~Macro name" ;
};
Edit RID_ED_MACRONAME
{
HelpID = "basctl:Edit:RID_MACROCHOOSER:RID_ED_MACRONAME";
Border = TRUE ;
SVLook = TRUE ;
Pos = MAP_APPFONT ( 6 , 14 ) ;
Size = MAP_APPFONT ( 110 , 12 ) ;
TabStop = TRUE ;
};
FixedText RID_TXT_MACROFROM
{
Pos = MAP_APPFONT ( 6 , 30 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Macro ~from" ;
};
FixedText RID_TXT_SAVEMACRO
{
Pos = MAP_APPFONT ( 6 , 30 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "Save m~acro in";
};
FixedText RID_TXT_DESCRIPTION
{
Pos = MAP_APPFONT ( 6 , 117 ) ;
Size = MAP_APPFONT ( 100 , 10 ) ;
Text [ en-US ] = "De~scription" ;
};
PushButton RID_PB_RUN
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_RUN";
Pos = MAP_APPFONT ( 231 , 6 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
DefButton = TRUE;
Text [ en-US ] = "R~un" ;
TabStop = TRUE ;
};
CancelButton RID_PB_CLOSE
{
Pos = MAP_APPFONT ( 231 , 23 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
Text [ en-US ] = "Close";
};
PushButton RID_PB_ASSIGN
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ASSIGN";
Pos = MAP_APPFONT ( 231 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Assign..." ;
TabStop = TRUE ;
};
PushButton RID_PB_EDIT
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_EDIT";
Size = MAP_APPFONT ( 50 , 14 ) ;
Pos = MAP_APPFONT ( 231 , 77 ) ;
Text [ en-US ] = "~Edit" ;
TabStop = TRUE ;
};
PushButton RID_PB_NEWLIB
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWLIB";
Pos = MAP_APPFONT ( 231 , 60 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "New ~Library";
};
PushButton RID_PB_NEWMOD
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_NEWMOD";
Size = MAP_APPFONT ( 50 , 14 ) ;
Pos = MAP_APPFONT ( 231 , 77 ) ;
Text [ en-US ] = "New M~odule";
};
PushButton RID_PB_DEL
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_DEL";
Pos = MAP_APPFONT ( 231 , 94 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Delete" ;
TabStop = TRUE ;
};
PushButton RID_PB_ORG
{
HelpID = "basctl:PushButton:RID_MACROCHOOSER:RID_PB_ORG";
Pos = MAP_APPFONT ( 231 , 114 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
Text [ en-US ] = "~Organizer..." ;
};
HelpButton RID_PB_HELP
{
Pos = MAP_APPFONT ( 231 , 131 ) ;
Size = MAP_APPFONT ( 50 , 14 ) ;
TabStop = TRUE ;
};
MultiLineEdit RID_ML_DESCRIPTION
{
HelpID = "basctl:MultiLineEdit:RID_MACROCHOOSER:RID_ML_DESCRIPTION";
Border = TRUE ;
Pos = MAP_APPFONT ( 6 , 131 ) ;
Size = MAP_APPFONT ( 216 , 28 ) ;
TabStop = TRUE ;
VScroll = TRUE ;
IgnoreTab = TRUE ;
};
};
String RID_STR_STDMACRONAME
{
Text [ en-US ] = "Macro" ;
};
String RID_STR_BTNDEL
{
Text [ en-US ] = "~Delete" ;
......@@ -178,10 +28,6 @@ String RID_STR_BTNNEW
{
Text [ en-US ] = "~New" ;
};
String RID_STR_CLOSE
{
Text [ en-US ] = "Close" ;
};
String RID_STR_CHOOSE
{
Text [ en-US ] = "Choose" ;
......@@ -190,7 +36,6 @@ String RID_STR_RUN
{
Text [ en-US ] = "Run" ;
};
String RID_STR_RECORD
{
Text [ en-US ] = "~Save" ;
......
This diff is collapsed.
......@@ -162,7 +162,7 @@
<child>
<object class="cuilo:SvxConfigGroupListBox" id="categories">
<property name="height_request">300</property>
<property name="width_request">200</property>
<property name="width_request">280</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
......@@ -227,7 +227,7 @@
<child>
<object class="cuilo:SvxConfigFunctionListBox" id="commands">
<property name="height_request">300</property>
<property name="width_request">200</property>
<property name="width_request">280</property>
<property name="visible">True</property>
<property name="can_focus">True</property>
</object>
......
......@@ -38,6 +38,7 @@
#include <vcl/svapp.hxx>
#include <vcl/accel.hxx>
#include <vcl/i18nhelp.hxx>
#include <vcl/builder.hxx>
#include <sot/formats.hxx>
#include <unotools/accessiblestatesethelper.hxx>
#include <rtl/instance.hxx>
......@@ -482,6 +483,11 @@ SvTreeListBox::SvTreeListBox(Window* pParent, const ResId& rResId) :
SetSublistOpenWithLeftRight();
}
extern "C" SAL_DLLPUBLIC_EXPORT Window* SAL_CALL makeSvTreeListBox(Window *pParent, VclBuilder::stringmap &)
{
return new SvTreeListBox(pParent);
}
void SvTreeListBox::Clear()
{
DBG_CHKTHIS(SvTreeListBox,0);
......
......@@ -712,6 +712,12 @@ Window *VclBuilder::makeObject(Window *pParent, const OString &name, const OStri
}
else if (name == "GtkTreeView")
{
//To-Do
//a) move svtools SvTreeViewBox into vcl
//b) make that the default target for GtkTreeView
//c) remove the non-drop down mode of ListBox and convert
// everything over to SvTreeViewBox
//d) remove the users of makeSvTreeViewBox
extractModel(id, rMap);
pWindow = new ListBox(pParent, WB_LEFT|WB_VCENTER|WB_3DLOOK);
}
......
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