123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573 |
- #ifndef Diagramm_H
- #define Diagramm_H
- #include "Zeichnung.h"
- #include "Array.h"
- #include "Critical.h"
- namespace Framework
- {
- class Rahmen;
- class AlphaFeld;
- class Text;
- class Schrift;
- class HScrollBar;
- class VScrollBar;
- class SLDiag;
- class LDiag;
- class TextRenderer;
-
- class SLDiag : public ZeichnungHintergrund
- {
- public:
- class Style : public ZeichnungHintergrund::Style
- {
- public:
- const static __int64 Gitter = 0x01000;
- const static __int64 LinienName = 0x02000;
- const static __int64 normal = Sichtbar | Hintergrund | Rahmen | Gitter | LinienName;
- };
- private:
- int gF;
- Array< int > *lFarbe;
- RCArray< Text > *lName;
- RCArray< Array< int > > *ph;
- RCArray< Array< int > > *pb;
- Array< int > *lastValue;
- TextRenderer *textRd;
- Punkt gitterGr;
- int lines;
- public:
-
- DLLEXPORT SLDiag();
-
- DLLEXPORT virtual ~SLDiag();
-
-
- DLLEXPORT void setTextRendererZ( TextRenderer *textRd );
-
-
- DLLEXPORT void setSchriftZ( Schrift *schrift );
-
-
- DLLEXPORT void setGSize( Punkt &gr );
-
-
- DLLEXPORT void setGFarbe( int f );
-
-
- DLLEXPORT void addLinie( const char *name );
-
-
- DLLEXPORT void addLinie( Text *txt );
-
-
-
- DLLEXPORT void setLFarbe( int lNum, int f );
-
-
-
-
- DLLEXPORT void addPunkt( int lNum, int x, int h );
-
-
- DLLEXPORT void removeLinie( int lNum );
-
-
- DLLEXPORT void render( Bild &zRObj ) override;
-
- DLLEXPORT Schrift *getSchrift() const;
-
- DLLEXPORT Schrift *zSchrift() const;
-
- DLLEXPORT const Punkt &getGSize() const;
-
- DLLEXPORT int getGFarbe() const;
-
-
- DLLEXPORT int getLinienNummer( const char *name ) const;
-
-
- DLLEXPORT int getLinienNummer( Text *name ) const;
-
-
- DLLEXPORT Text *getLinienName( int lNum ) const;
-
-
- DLLEXPORT Text *zLinienNamen( int lNum ) const;
-
- DLLEXPORT int getHighestValue() const;
-
-
- DLLEXPORT int getHighestValue( int lNum ) const;
-
-
- DLLEXPORT int getMedian( int lNum ) const;
-
- DLLEXPORT int getLAnzahl() const;
-
-
- DLLEXPORT int getLastValue( int lNum ) const;
- };
-
- struct DiagPunkt
- {
-
- double hIntervall;
-
- double vIntervall;
- };
-
- struct DiagWert : public virtual ReferenceCounter
- {
-
- class Style
- {
- public:
- const static int Sichtbar = 0x01;
- const static int Alpha = 0x02;
- const static int Hintergrund = 0x04;
- const static int HAlpha = 0x08;
- const static int Name = 0x10;
- };
-
- int style;
-
- int farbe;
-
- int hintergrund;
-
- Text *name;
-
- Array< DiagPunkt* > *punkte;
-
- DLLEXPORT DiagWert();
-
- DLLEXPORT ~DiagWert();
- };
-
- struct DiagDaten : public virtual ReferenceCounter
- {
- class Style
- {
- public:
- const static int Sichtbar = 0x0001;
- const static int Raster = 0x0002;
- const static int RasterAlpha = 0x0004;
- const static int AutoIntervallHeight = 0x0008;
- const static int AutoIntervallBreite = 0x0010;
- const static int HIntervall = 0x0020;
- const static int VIntervall = 0x0040;
- const static int HIntervallTexte = 0x0200;
- const static int VIntervallTexte = 0x0400;
- const static int AutoRasterBreite = 0x0800;
- const static int AutoRasterHeight = 0x1000;
- const static int intervalle = HIntervall | VIntervall;
- const static int intervallTexte = HIntervallTexte | VIntervallTexte;
- const static int autoRaster = AutoRasterHeight | AutoRasterBreite | Raster;
- const static int autoIntervall = AutoIntervallHeight | AutoIntervallBreite;
- };
-
- int style;
-
- int rasterDicke;
-
- double rasterBreite;
-
- double rasterHeight;
-
- int rasterFarbe;
-
- int hIntervallFarbe;
-
- int vIntervallFarbe;
-
- Text *hIntervallName;
-
- Text *vIntervallName;
-
- RCArray< Text > *hIntervallTexte;
-
- RCArray< Text > *vIntervallTexte;
-
- Array< double > *hIntervallWerte;
-
- Array< double > *vIntervallWerte;
-
- double hIntervallBreite;
-
- double vIntervallHeight;
-
- RCArray< DiagWert > *werte;
-
- DLLEXPORT DiagDaten();
-
- DLLEXPORT ~DiagDaten();
- };
-
- class BaseDiag
- {
- protected:
- DiagDaten *daten;
- bool changed;
- Critical *lock;
- public:
-
-
- DLLEXPORT BaseDiag( Critical *lock );
-
- DLLEXPORT virtual ~BaseDiag();
-
-
- DLLEXPORT void setDiagDatenZ( DiagDaten *dd );
-
-
- DLLEXPORT void setDiagDaten( DiagDaten *dd );
-
-
- DLLEXPORT void setRasterDicke( int d );
-
-
- DLLEXPORT void setRasterBreite( int br );
-
-
- DLLEXPORT void setRasterHeight( int hi );
-
-
- DLLEXPORT void setRasterFarbe( int f );
-
-
- DLLEXPORT void setHIntervallBreite( double br );
-
-
- DLLEXPORT void setVIntervallHeight( double hi );
-
-
- DLLEXPORT void setHIntervallFarbe( int f );
-
-
- DLLEXPORT void setVIntervallFarbe( int f );
-
-
- DLLEXPORT void setHIntervallName( char *name );
-
-
- DLLEXPORT void setHIntervallName( Text *name );
-
-
- DLLEXPORT void setVIntervallName( char *name );
-
-
- DLLEXPORT void setVIntervallName( Text *name );
-
-
-
- DLLEXPORT void addHIntervallText( double hIntervall, char *text );
-
-
-
- DLLEXPORT void addHIntervallText( double hIntervall, Text *text );
-
-
-
- DLLEXPORT void setHIntervallTextZ( double hIntervall, Text *text );
-
-
-
- DLLEXPORT void setHIntervallText( double hIntervall, Text *text );
-
-
-
- DLLEXPORT void setHIntervallText( double hIntervall, char *text );
-
-
- DLLEXPORT void removeHIntervallText( double hIntervall );
-
-
-
- DLLEXPORT void addVIntervallText( double vIntervall, char *text );
-
-
-
- DLLEXPORT void addVIntervallText( double vIntervall, Text *text );
-
-
-
- DLLEXPORT void setVIntervallTextZ( double vIntervall, Text *text );
-
-
-
- DLLEXPORT void setVIntervallText( double vIntervall, Text *text );
-
-
-
- DLLEXPORT void setVIntervallText( double vIntervall, char *text );
-
-
- DLLEXPORT void removeVIntervallText( double vIntervall );
-
-
- DLLEXPORT void addWertZ( DiagWert *w );
-
-
- DLLEXPORT void addWert( DiagWert *w );
-
-
- DLLEXPORT void addWert( const char *name );
-
-
- DLLEXPORT void addWert( Text *txt );
-
-
-
- DLLEXPORT void setWertFarbe( int wNum, int fc );
-
-
-
- DLLEXPORT void addPunktZ( int wNum, DiagPunkt *p );
-
-
-
- DLLEXPORT void addPunkt( int wNum, DiagPunkt *p );
-
-
-
-
- DLLEXPORT void addPunkt( int wNum, double hI, double vI );
-
-
-
-
- DLLEXPORT void setPunktZ( int wNum, double hI, DiagPunkt *p );
-
-
-
-
- DLLEXPORT void setPunkt( int wNum, double hI, DiagPunkt *p );
-
-
-
-
-
- DLLEXPORT void setPunkt( int wNum, double hI, double h, double v );
-
-
-
-
- DLLEXPORT void setPunktZ( int wNum, int pNum, DiagPunkt *p );
-
-
-
-
- DLLEXPORT void setPunkt( int wNum, int pNum, DiagPunkt *p );
-
-
-
-
-
- DLLEXPORT void setPunkt( int wNum, int pNum, double h, double v );
-
-
-
- DLLEXPORT void removePunkt( int wNum, double hI );
-
-
-
- DLLEXPORT void removePunkt( int wNum, int pNum );
-
-
- DLLEXPORT void removeWert( int wNum );
-
-
- DLLEXPORT void removeWert( char *name );
-
-
- DLLEXPORT void removeWert( Text *name );
-
-
- DLLEXPORT void addDatenStyle( int style );
-
-
- DLLEXPORT void setDatenStyle( int style );
-
-
-
- DLLEXPORT void setDatenStyle( int style, bool addRemove );
-
-
- DLLEXPORT void removeDatenStyle( int style );
-
-
-
- DLLEXPORT void addWertStyle( int wNum, int style );
-
-
-
- DLLEXPORT void setWertStyle( int wNum, int style );
-
-
-
-
- DLLEXPORT void setWertStyle( int wNum, int style, bool addRemove );
-
-
-
- DLLEXPORT void removeWertStyle( int wNum, int style );
-
- DLLEXPORT DiagDaten *getDiagDaten() const;
-
- DLLEXPORT DiagDaten *zDiagDaten() const;
-
-
- DLLEXPORT DiagWert *getDiagWert( int wNum ) const;
-
-
- DLLEXPORT DiagWert *zDiagWert( int wNum ) const;
-
-
- DLLEXPORT DiagWert *getDiagWert( char *name ) const;
-
-
- DLLEXPORT DiagWert *zDiagWert( char *name ) const;
-
-
- DLLEXPORT int getDiagWertPos( char *name ) const;
-
-
-
- DLLEXPORT int getDiagPunktPos( int wNum, double hI ) const;
-
-
-
- DLLEXPORT int getDiagPunktPos( char *wName, double hI ) const;
-
-
- DLLEXPORT inline bool hatDatenStyle( int style ) const;
-
-
- DLLEXPORT inline bool hatDatenStyleNicht( int style ) const;
-
-
-
- DLLEXPORT inline bool hatWertStyle( int wNum, int style ) const;
-
-
-
- DLLEXPORT inline bool hatWertStyleNicht( int wNum, int style ) const;
- };
-
- class LDiag : public ZeichnungHintergrund, public BaseDiag
- {
- public:
- class Style : public ZeichnungHintergrund::Style
- {
- public:
- const static __int64 DatenRahmen = 0x0001000;
- const static __int64 DatenHintergrund = 0x02000;
- const static __int64 DatenHAlpha = 0x04000;
- const static __int64 DatenHBild = 0x008000;
- const static __int64 DatenBuffered = 0x010000;
- const static __int64 scroll = VScroll | HScroll;
- const static __int64 normal = Hintergrund | scroll | DatenRahmen;
- };
- private:
- TextRenderer *textRd;
- Rahmen *dRam;
- int dBgF;
- Bild *dBgB;
- AlphaFeld *dAf;
- Bild *vIntervallRB;
- Bild *hIntervallRB;
- int schriftGr;
-
-
- DLLEXPORT void doMausEreignis( MausEreignis &me, bool userRet ) override;
- public:
-
- DLLEXPORT LDiag();
-
- DLLEXPORT virtual ~LDiag();
-
-
- DLLEXPORT void setTextRendererZ( TextRenderer *textRd );
-
-
- DLLEXPORT void setSchriftZ( Schrift *schrift );
-
-
- DLLEXPORT void setSchriftSize( int gr );
-
-
- DLLEXPORT void setDatenRahmenZ( Rahmen *ram );
-
-
- DLLEXPORT void setDatenRahmen( Rahmen *ram );
-
-
- DLLEXPORT void setDatenRahmenBreite( int br );
-
-
- DLLEXPORT void setDatenRahmenFarbe( int fc );
-
- DLLEXPORT void setDatenHintergrundFarbe( int fc );
- DLLEXPORT void setDatenHintergrundBildZ( Bild *b );
- DLLEXPORT void setDatenHintergrundBild( Bild *b );
-
-
- DLLEXPORT void setDatenAlphaFeldZ( AlphaFeld *af );
-
-
- DLLEXPORT void setDatenAlphaFeld( AlphaFeld *af );
-
-
- DLLEXPORT void setDatenAlphaFeldFarbe( int fc );
-
-
- DLLEXPORT void setDatenAlphaFeldStrength( int st );
-
-
- DLLEXPORT void render( Bild &zRObj ) override;
-
- DLLEXPORT Schrift *getSchrift() const;
-
- DLLEXPORT Schrift *zSchrift() const;
-
- DLLEXPORT Rahmen *getDatenRahmen() const;
-
- DLLEXPORT Rahmen *zDatenRahmen() const;
-
- DLLEXPORT int getDatenRahmenFarbe() const;
-
- DLLEXPORT int getDatenRahmenBreite() const;
-
- DLLEXPORT int getDatenHintergrundFarbe() const;
-
- DLLEXPORT Bild *getDatenHintergrundBild() const;
-
- DLLEXPORT Bild *zDatenHintergrundBild() const;
-
- DLLEXPORT AlphaFeld *getDatenAlphaFeld() const;
-
- DLLEXPORT AlphaFeld *zDatenAlphaFeld() const;
-
- DLLEXPORT int getDatenAlphaFeldFarbe() const;
-
- DLLEXPORT int getDatenAlphaFeldStrength() const;
- };
- }
- #endif
|