namespace vcl
{ class Window;
} class OutputDevice; class SdDrawDocument;
namespace sd
{ /** The purpose of the <type>WindowUpdater</type> is to update output devicestotakecareofmodifiedglobalvalues.Thesevaluesare monitoredforchanges.Atthemomentthisis thedigitlanguagethatdefinestheglyphstousetorenderdigits. Othervaluesmaybeaddedinthefuture.
<p>Windowsthataretobekeptup-to-datehavetoberegisteredviathe <member>RegisterWindow()</member>method.Whenadocumentisgiventhen thisdocumentisreformattedwhenthemonitoredoptionchanges.</p>
*/ class WindowUpdater final : public utl::ConfigurationListener
{ public: explicit WindowUpdater(); virtual ~WindowUpdater() noexcept override;
/** Add the given device to the list of devices which will be updated whenoneofthemonitoredvalueschanges. @parampWindow Thisdeviceisaddedtothedevicelistifitisnot<null/>and whenitisnotalreadyamemberofthatlist.
*/ void RegisterWindow(vcl::Window* pWindow);
/** Remove the given device from the list of devices which will be updated whenoneofthemonitoredvalueschanges. @parampWindow Thisdeviceisremovedfromthedevicelistwhenitisamember ofthatlist.
*/ void UnregisterWindow(vcl::Window* pWindow);
/** Set the document so that it is reformatted when one of the monitored valueschanges. @parampDocument When<null/>isgivendocumentreformattingwillnottake placeinthefuture.
*/ void SetDocument(SdDrawDocument* pDocument);
/** Update the given output device and update all text objects of the viewshellifnottoldotherwise. @parampWindow Thedevicetoupdate.WhenthegivenpointerisNULLthen nothingisdone.
*/ staticvoid Update(OutputDevice* pDevice);
/** Callback that waits for notifications of a <type>SvtCTLOptions</type>object.
*/ virtualvoid ConfigurationChanged(utl::ConfigurationBroadcaster*,
ConfigurationHints nHint) override;
private: /// Options to monitor for changes.
SvtCTLOptions maCTLOptions;
/// The document rendered in the output devices.
SdDrawDocument* mpDocument;
/** Type and data member for a list of devices that have to be kept up-to-date.
*/ typedef ::std::vector<VclPtr<vcl::Window>> tWindowList;
tWindowList maWindowList;
/** The central method of this class. Update the given output device. Itisthetaskofthecallertoinitiateareformattingofthe documentthatisrenderedonthisdevicetoreflectthechanges. @parampWindow Theoutputdevicetoupdate.Whenitis<null/>thenthecall isignored.
*/ staticvoid UpdateWindow(OutputDevice* pDevice);
};
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.