Salome HOME
MPV: Merge V1_2d
[modules/visu.git] / src / VISU_I / VISU_ScalarMap_i.hh
index f6dbca2a6145d30e8ccef7d75fe79bacb6835369..593213f0531e06dfb87ec374456529162d9d7f2b 100644 (file)
@@ -40,10 +40,11 @@ namespace VISU{
     ScalarMap_i(const ScalarMap_i&);
 
   public:
-    ScalarMap_i(Result_i* theResult, bool theAddToStudy = true);
+    ScalarMap_i(Result_i* theResult, bool theAddToStudy = true,
+               SALOMEDS::SObject_ptr theSObject = SALOMEDS::SObject::_nil());
     virtual void SameAs(const ScalarMap_i* theOrigin);
     virtual ~ScalarMap_i();
-    virtual void Destroy();
+    virtual void RemoveFromStudy();
 
     virtual VISU::VISUType GetType() { return VISU::TSCALARMAP;};
 
@@ -60,10 +61,10 @@ namespace VISU{
     virtual void SetNbColors(CORBA::Long theNbColors);
     virtual CORBA::Long GetNbColors();
 
-    virtual void SetOrientation(VISU::ScalarMap::Orientation theOrientation){ 
+    virtual void SetBarOrientation(VISU::ScalarMap::Orientation theOrientation){ 
       myOrientation = theOrientation;
     }
-    virtual VISU::ScalarMap::Orientation GetOrientation() { return myOrientation;}
+    virtual VISU::ScalarMap::Orientation GetBarOrientation() { return myOrientation;}
 
     virtual void SetPosition(CORBA::Double X, CORBA::Double Y) { myPosition[0] = X; myPosition[1] = Y;}
     virtual CORBA::Double GetPosX() { return myPosition[0];} 
@@ -81,6 +82,41 @@ namespace VISU{
     virtual void SetTitle(const char* theName) { myTitle = theName;}
     virtual char* GetTitle() { return CORBA::string_dup(myTitle.c_str());}
 
+    virtual bool IsBoldTitle() { return myIsBoldTitle;}
+    virtual void SetBoldTitle(bool isBold) { myIsBoldTitle = isBold;}
+
+    virtual bool IsItalicTitle() { return myIsItalicTitle;}
+    virtual void SetItalicTitle(bool isItalic) { myIsItalicTitle = isItalic;}
+
+    virtual bool IsShadowTitle() { return myIsShadowTitle;}
+    virtual void SetShadowTitle(bool isShadow) { myIsShadowTitle = isShadow;}
+
+    virtual int GetTitFontType() { return myTitFontType;}
+    virtual void SetTitFontType(int theType) { myTitFontType = theType;}
+
+    virtual void GetTitleColor(float* theR, float* theG, float* theB) 
+    {*theR = myTitleColor[0]; *theG = myTitleColor[1]; *theB = myTitleColor[2];}
+    virtual void SetTitleColor(float theR, float theG, float theB) 
+    {myTitleColor[0] = theR; myTitleColor[1] = theG; myTitleColor[2] = theB; }
+
+    /////
+    virtual bool IsBoldLabel() { return myIsBoldLabel;}
+    virtual void SetBoldLabel(bool isBold) { myIsBoldLabel = isBold;}
+
+    virtual bool IsItalicLabel() { return myIsItalicLabel;}
+    virtual void SetItalicLabel(bool isItalic) { myIsItalicLabel = isItalic;}
+
+    virtual bool IsShadowLabel() { return myIsShadowLabel;}
+    virtual void SetShadowLabel(bool isShadow) {myIsShadowLabel = isShadow;}
+
+    virtual int GetLblFontType() { return myLblFontType;}
+    virtual void SetLblFontType(int theType) { myLblFontType = theType;}
+
+    virtual void GetLabelColor(float* theR, float* theG, float* theB) 
+    {*theR = myLabelColor[0]; *theG = myLabelColor[1]; *theB = myLabelColor[2];}
+    virtual void SetLabelColor(float theR, float theG, float theB) 
+    {myLabelColor[0] = theR; myLabelColor[1] = theG; myLabelColor[2] = theB; }
+
     typedef VISU::ScalarMap TInterface;
     VISU_ScalarMapPL* GetScalarMapPL(){ return myScalarMapPL;}
 
@@ -103,9 +139,22 @@ namespace VISU{
     float myPosition[2], myWidth, myHeight;
     VISU::ScalarMap::Orientation myOrientation;
 
+    //Font management
+    bool myIsBoldTitle;
+    bool myIsItalicTitle;
+    bool myIsShadowTitle;
+    int  myTitFontType;
+    float myTitleColor[3];
+
+    bool myIsBoldLabel;
+    bool myIsItalicLabel;
+    bool myIsShadowLabel;
+    int  myLblFontType;
+    float myLabelColor[3];
+
   public:
     static int IsPossible(Result_i* theResult, const char* theMeshName, VISU::Entity theEntity, 
-                         const char* theFieldName, int theIteration);
+                         const char* theFieldName, int theIteration, int isMemoryCheck = true);
     virtual Storable* Create(const char* theMeshName, VISU::Entity theEntity, 
                             const char* theFieldName, int theIteration);
 
@@ -121,7 +170,7 @@ namespace VISU{
                             const string& thePrefix, const Storable::TRestoringMap& theMap)
       throw(std::logic_error&);
 
-    virtual void Update();
+    virtual void Update() throw(std::runtime_error&);
     virtual void SetMapScale(double theMapScale = 1.0);
 
     const VISU::TField*  GetField() const { return myField;}
@@ -134,7 +183,7 @@ namespace VISU{
 
     virtual VISU_Actor* CreateActor(const Handle(SALOME_InteractiveObject)& theIO = NULL)
       throw (std::runtime_error&);
-    virtual void UpdateActor(VISU_Actor* theActor);
+    virtual void UpdateActor(VISU_Actor* theActor) throw(std::runtime_error&);
   };
 }