Change-Id: Ic255b8ba56f5b355a95ddc9a9587e1747b66702a Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94071 Tested-by: Jenkins CollaboraOffice <jenkinscollaboraoffice@gmail.com> Reviewed-by: Szymon Kłos <szymon.klos@collabora.com> Reviewed-on: https://gerrit.libreoffice.org/c/core/+/94487 Tested-by: Jenkins
52 lines
1.7 KiB
C++
52 lines
1.7 KiB
C++
#ifndef INCLUDED_VCL_INC_JSDIALOG_JSDIALOG_HXX
|
|
#define INCLUDED_VCL_INC_JSDIALOG_JSDIALOG_HXX
|
|
|
|
#include <vcl/weld.hxx>
|
|
#include <comphelper/string.hxx>
|
|
#include <vcl/sysdata.hxx>
|
|
#include <vcl/virdev.hxx>
|
|
#include <vcl/builder.hxx>
|
|
#include <salvtables.hxx>
|
|
|
|
class JSDialogSender
|
|
{
|
|
VclPtr<vcl::Window> m_aOwnedToplevel;
|
|
|
|
public:
|
|
JSDialogSender(VclPtr<vcl::Window> aOwnedToplevel)
|
|
: m_aOwnedToplevel(aOwnedToplevel)
|
|
{
|
|
}
|
|
|
|
void notifyDialogState();
|
|
};
|
|
|
|
class VCL_DLLPUBLIC JSInstanceBuilder : public SalInstanceBuilder
|
|
{
|
|
public:
|
|
JSInstanceBuilder(weld::Widget* pParent, const OUString& rUIRoot, const OUString& rUIFile);
|
|
virtual std::unique_ptr<weld::Dialog> weld_dialog(const OString& id,
|
|
bool bTakeOwnership = true) override;
|
|
virtual std::unique_ptr<weld::Label> weld_label(const OString& id,
|
|
bool bTakeOwnership = false) override;
|
|
virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id,
|
|
bool bTakeOwnership = false) override;
|
|
};
|
|
|
|
class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel, public JSDialogSender
|
|
{
|
|
public:
|
|
JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder,
|
|
bool bTakeOwnership);
|
|
virtual void set_label(const OUString& rText) override;
|
|
};
|
|
|
|
class VCL_DLLPUBLIC JSEntry : public SalInstanceEntry, public JSDialogSender
|
|
{
|
|
public:
|
|
JSEntry(VclPtr<vcl::Window> aOwnedToplevel, ::Edit* pEntry, SalInstanceBuilder* pBuilder,
|
|
bool bTakeOwnership);
|
|
virtual void set_text(const OUString& rText) override;
|
|
};
|
|
|
|
#endif |