2020-02-18 15:41:56 +01:00
|
|
|
#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>
|
|
|
|
|
2020-02-24 18:35:18 +01:00
|
|
|
class JSDialogSender
|
|
|
|
{
|
|
|
|
VclPtr<vcl::Window> m_aOwnedToplevel;
|
|
|
|
|
|
|
|
public:
|
|
|
|
JSDialogSender(VclPtr<vcl::Window> aOwnedToplevel)
|
|
|
|
: m_aOwnedToplevel(aOwnedToplevel)
|
|
|
|
{
|
|
|
|
}
|
|
|
|
|
|
|
|
void notifyDialogState();
|
|
|
|
};
|
|
|
|
|
2020-02-18 15:41:56 +01:00
|
|
|
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;
|
2020-02-24 18:35:18 +01:00
|
|
|
virtual std::unique_ptr<weld::Entry> weld_entry(const OString& id,
|
|
|
|
bool bTakeOwnership = false) override;
|
2020-02-18 15:41:56 +01:00
|
|
|
};
|
|
|
|
|
2020-02-24 18:35:18 +01:00
|
|
|
class VCL_DLLPUBLIC JSLabel : public SalInstanceLabel, public JSDialogSender
|
2020-02-18 15:41:56 +01:00
|
|
|
{
|
|
|
|
public:
|
|
|
|
JSLabel(VclPtr<vcl::Window> aOwnedToplevel, FixedText* pLabel, SalInstanceBuilder* pBuilder,
|
|
|
|
bool bTakeOwnership);
|
|
|
|
virtual void set_label(const OUString& rText) override;
|
|
|
|
};
|
|
|
|
|
2020-02-24 18:35:18 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
|
2020-02-18 15:41:56 +01:00
|
|
|
#endif
|