10#ifndef INCLUDED_VCL_BUILDER_HXX
11#define INCLUDED_VCL_BUILDER_HXX
40class NumericFormatter;
72 typedef std::map<OUString, std::pair<OUString, OUString>>
accelmap;
79 css::uno::Reference<css::frame::XFrame>
xFrame
80 = css::uno::Reference<css::frame::XFrame>(),
85 void disposeBuilder();
87 template <
typename T> T*
get(
VclPtr<T>& ret,
const OUString& sID);
90 template <
typename T = vcl::Window> T*
get(
const OUString& sID);
95 PopupMenu* get_menu(std::u16string_view sID);
104 void setDeferredProperties();
112 static SymbolType mapStockToSymbol(std::u16string_view icon_name);
135 : m_bVerticalOrient(bVerticalOrient)
149 , m_aPackingData(bVertical)
169 , m_sValue(
std::move(sValue))
180 , m_sValue(
std::move(sValue))
194 , m_sValue(
std::move(sValue))
212 , m_sValue(
std::move(sValue))
213 , m_nActiveId(nActiveId)
220 typedef std::vector<OUString>
row;
224 const ListStore* get_model_by_name(
const OUString& sID)
const;
225 void mungeModel(
ListBox &rTarget,
const ListStore &rStore, sal_uInt16 nActiveId);
226 void mungeModel(
ComboBox &rTarget,
const ListStore &rStore, sal_uInt16 nActiveId);
230 const TextBuffer* get_buffer_by_name(
const OUString& sID)
const;
235 const Adjustment* get_adjustment_by_name(
const OUString& sID)
const;
237 static void mungeAdjustment(NumericFormatter &rTarget,
const Adjustment &rAdjustment);
240 static void mungeAdjustment(
Slider &rTarget,
const Adjustment &rAdjustment);
306 void delete_by_name(
const OUString& sID);
325 const OUString &rClass,
const OUString &rID,
330 const OUString &rClass,
const OUString &rID,
333 void connectNumericFormatterAdjustment(
const OUString &
id,
const OUString &rAdjustment);
334 void connectFormattedFormatterAdjustment(
const OUString &
id,
const OUString &rAdjustment);
336 static int getImageSize(
const stringmap &rMap);
338 void extractGroup(
const OUString &
id,
stringmap &rVec);
339 void extractModel(
const OUString &
id,
stringmap &rVec);
340 void extractBuffer(
const OUString &
id,
stringmap &rVec);
341 static bool extractAdjustmentToMap(
const OUString &
id,
stringmap &rVec, std::vector<WidgetAdjustmentMap>& rAdjustmentMap);
342 void extractButtonImage(
const OUString &
id,
stringmap &rMap,
bool bRadio);
343 void extractMnemonicWidget(
const OUString &
id,
stringmap &rMap);
350 static std::vector<vcl::EnumContext::Context> handleStyle(
xmlreader::XmlReader &reader,
int &nPriority);
359 void insertMenuObject(
362 const OUString &rClass,
371 void handleListStore(
xmlreader::XmlReader &reader,
const OUString &rID, std::u16string_view rClass);
386 void set_window_packing_position(
const vcl::Window *pWindow, sal_Int32 nPosition);
391 void set_response(std::u16string_view sID,
short nResponse);
393 OUString get_by_window(
const vcl::Window *pWindow)
const;
424 SAL_WARN_IF(!
w,
"vcl.layout",
"widget \"" << sID <<
"\" not found in .ui");
426 "vcl.layout",
".ui widget \"" << sID <<
"\" needs to correspond to vcl type " <<
typeid(T).
name());
428 assert(
dynamic_cast<T*
>(
w));
429 ret =
static_cast<T*
>(
w);
439 "vcl.layout",
".ui widget \"" << sID <<
"\" needs to correspond to vcl type " <<
typeid(T).
name());
440 assert(!
w ||
dynamic_cast<T*
>(
w));
441 return static_cast<T*
>(
w);
VCL_DLLPUBLIC bool toBool(std::u16string_view rValue)
A widget used to choose from a list of items and which has an entry.
A widget used to choose from a list of items and which has no entry.
sortIntoBestTabTraversalOrder(VclBuilder *pBuilder)
Creates a hierarchy of vcl::Windows (widgets) from a .ui file for dialogs, sidebar,...
T * get(VclPtr< T > &ret, const OUString &sID)
stringmap m_aDeferredProperties
UStringPair WidgetAdjustmentMap
VclPtr< vcl::Window > m_pParent
css::uno::Reference< css::frame::XFrame > m_xFrame
XFrame to be able to extract labels and other properties of the UNO commands (like of ....
VclBuilder(const VclBuilder &)=delete
bool m_bToplevelHasDeferredInit
std::vector< WinAndId > m_aChildren
const OUString & getUIFile() const
return UI-File name (without '.ui')
bool m_bToplevelHasDeferredProperties
std::vector< std::unique_ptr< OUString > > m_aUserData
ResHookProc m_pStringReplace
bool m_bToplevelParentFound
UStringPair ButtonMenuMap
std::map< OUString, OUString > stringmap
std::map< OUString, int > ImageSizeMap
StringPair RadioButtonGroupMap
std::vector< MenuAndId > m_aMenus
std::unique_ptr< ParserState > m_pParserState
VclBuilder & operator=(const VclBuilder &)=delete
UStringPair TextBufferMap
std::map< OUString, std::pair< OUString, OUString > > accelmap
UStringPair MnemonicWidgetMap
vcl::Window * get_by_name(std::u16string_view sID)
std::unique_ptr< NotebookBarAddonsItem > m_pNotebookBarAddonsItem
reference_type * get() const
Get the body.
#define SAL_WARN_IF(condition, area, stream)
void ensureDefaultWidthChars(VclBuilder::stringmap &rMap)
sal_Int16 getRoleFromName(const OUString &roleName)
void set_properties(vcl::Window *pWindow, const VclBuilder::stringmap &rProps)
OUString convertMnemonicMarkup(std::u16string_view rIn)
bool extractDropdown(VclBuilder::stringmap &rMap)
OUString extractCustomProperty(VclBuilder::stringmap &rMap)
void reorderWithinParent(vcl::Window &rWindow, sal_uInt16 nNewPosition)
css::uno::Reference< css::linguistic2::XProofreadingIterator > get(css::uno::Reference< css::uno::XComponentContext > const &context)
OUString(* ResHookProc)(const OUString &rStr)
ComboBoxTextItem(OUString sItem, OUString sId)
ComboBoxModelMap(OUString sId, OUString sValue, sal_Int32 nActiveId)
std::vector< row > m_aEntries
std::vector< OUString > row
PackingData(bool bVerticalOrient=false)
ToolBoxItemId m_nLastToolbarId
std::vector< MnemonicWidgetMap > m_aMnemonicWidgetMaps
std::vector< ButtonImageWidgetMap > m_aButtonImageWidgetMaps
std::map< OUString, TextBuffer > m_aTextBuffers
std::map< OUString, ListStore > m_aModels
ImageSizeMap m_aImageSizeMap
std::vector< WidgetAdjustmentMap > m_aScrollAdjustmentMaps
std::map< OUString, Adjustment > m_aAdjustments
std::vector< RadioButtonGroupMap > m_aGroupMaps
std::vector< VclPtr< MessageDialog > > m_aMessageDialogs
std::vector< SizeGroup > m_aSizeGroups
std::vector< WidgetAdjustmentMap > m_aFormattedFormatterAdjustmentMaps
std::vector< TextBufferMap > m_aTextBufferMaps
std::map< VclPtr< vcl::Window >, stringmap > m_aAtkInfo
std::vector< WidgetAdjustmentMap > m_aSliderAdjustmentMaps
sal_uInt16 m_nLastMenuItemId
std::vector< ButtonMenuMap > m_aButtonMenuMaps
std::map< VclPtr< vcl::Window >, VclPtr< vcl::Window > > m_aRedundantParentWidgets
std::vector< ComboBoxModelMap > m_aModelMaps
std::vector< WidgetAdjustmentMap > m_aNumericFormatterAdjustmentMaps
std::vector< VclPtr< VclExpander > > m_aExpanderWidgets
std::vector< OUString > m_aWidgets
StringPair(OUString sId, OUString sValue)
UStringPair(OUString sId, OUString sValue)
WinAndId(OUString sId, vcl::Window *pWindow, bool bVertical)
PackingData m_aPackingData
VclPtr< vcl::Window > m_pWindow
Reference< XFrame > xFrame