123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241 |
- #pragma once
- #include "Zeichnung.h"
- #include "Trie.h"
- #include "Array.h"
- #include "UIInitialization.h"
- namespace Framework
- {
- class Text;
- class ObjTabelle;
- class Schrift;
- class Bildschirm;
- class UIMLContainer;
- namespace XML
- {
- class Element;
- }
- class UIMLElement : public virtual ReferenceCounter
- {
- public:
- DLLEXPORT UIMLElement();
- DLLEXPORT virtual ~UIMLElement();
-
- virtual bool isApplicableFor(XML::Element& element) = 0;
-
- virtual Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) = 0;
-
- DLLEXPORT virtual void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter);
- };
- class UIMLContainer : public UIMLElement
- {
- public:
- DLLEXPORT UIMLContainer();
- DLLEXPORT virtual ~UIMLContainer();
- virtual Zeichnung* zZeichnungById(const char* id) = 0;
- virtual Zeichnung* getZeichnungById(const char* id) = 0;
- virtual const UIInit& getFactory() = 0;
- };
- class UIMLTextField : public UIMLElement
- {
- public:
- DLLEXPORT UIMLTextField();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLButton : public UIMLElement
- {
- public:
- DLLEXPORT UIMLButton();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLCheck : public UIMLElement
- {
- public:
- DLLEXPORT UIMLCheck();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLText : public UIMLElement
- {
- public:
- DLLEXPORT UIMLText();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLTextArea : public UIMLElement
- {
- public:
- DLLEXPORT UIMLTextArea();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLTable : public UIMLElement
- {
- public:
- DLLEXPORT UIMLTable();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
- class UIMLFrame : public UIMLElement
- {
- public:
- DLLEXPORT UIMLFrame();
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- };
-
- class UIMLView : public ZeichnungHintergrund, public UIMLContainer
- {
- private:
- RCArray<UIMLElement> knownElements;
- UIInit init;
- Trie< Zeichnung >* members;
- XML::Element* dom;
- int nextId;
-
-
- DLLEXPORT virtual void doMausEreignis(MausEreignis& me, bool userRet) override;
- public:
-
- DLLEXPORT UIMLView();
-
-
-
-
- DLLEXPORT UIMLView(XML::Element* uiml, UIInit& init);
-
-
-
-
- DLLEXPORT UIMLView(Text uiml, UIInit& init);
- DLLEXPORT ~UIMLView();
-
- DLLEXPORT void removeAllKnownElements();
-
- DLLEXPORT void addKnownElement(UIMLElement* element);
-
- DLLEXPORT bool isKnownElement(XML::Element* zElement);
-
-
- DLLEXPORT void setUIML(XML::Element* uiml);
-
-
- DLLEXPORT void setUIML(Text uiml);
-
- DLLEXPORT void layout();
-
-
-
- DLLEXPORT Text addMember(Text uiml);
-
-
-
- DLLEXPORT Text addMember(Text uiml, Text parentId);
-
-
- DLLEXPORT void removeMember(Text id);
-
-
- DLLEXPORT Zeichnung* zZeichnungById(const char* id) override;
-
-
- DLLEXPORT Zeichnung* getZeichnungById(const char* id) override;
-
-
- DLLEXPORT virtual void doTastaturEreignis(TastaturEreignis& te);
-
-
-
- DLLEXPORT bool tick(double tickVal) override;
-
- DLLEXPORT void render(Bild& rObj) override;
-
-
- DLLEXPORT XML::Element* zDom() const;
-
-
- DLLEXPORT XML::Element* getDom() const;
- DLLEXPORT bool isApplicableFor(XML::Element& element) override;
- DLLEXPORT Zeichnung* parseElement(XML::Element& element, UIMLContainer& generalFactory) override;
- DLLEXPORT void layout(XML::Element& element, Zeichnung& z, int pWidth, int pHeight, UIMLContainer& generalLayouter) override;
- DLLEXPORT const UIInit& getFactory() override;
- };
- }
|