]> Creatis software - bbtk.git/commitdiff
ColourDialog --> ColourSelector
authorjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 20 Feb 2008 11:36:29 +0000 (11:36 +0000)
committerjean-pierre roux <jean-pierre.roux@creatis.insa-lyon.fr>
Wed, 20 Feb 2008 11:36:29 +0000 (11:36 +0000)
packages/wx/src/bbwxColourSelectorButton.cxx [moved from packages/wx/src/bbwxColourDialogButton.cxx with 81% similarity]
packages/wx/src/bbwxColourSelectorButton.h [moved from packages/wx/src/bbwxColourDialogButton.h with 66% similarity]

similarity index 81%
rename from packages/wx/src/bbwxColourDialogButton.cxx
rename to packages/wx/src/bbwxColourSelectorButton.cxx
index eadb5e9ad3e77c6a2b6ce0e625569508a2abe67e..791d96771d432f24fefa03d70d19b0d9e9b1c3ff 100644 (file)
@@ -1,10 +1,10 @@
 /*=========================================================================
                                                                                 
   Program:   bbtk
-  Module:    $RCSfile: bbwxColourDialogButton.cxx,v $
+  Module:    $RCSfile: bbwxColourSelectorButton.cxx,v $
   Language:  C++
-  Date:      $Date: 2008/02/14 16:55:07 $
-  Version:   $Revision: 1.3 $
+  Date:      $Date: 2008/02/20 11:36:29 $
+  Version:   $Revision: 1.1 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -26,7 +26,7 @@
 
 #ifdef _USE_WXWIDGETS_
 
-#include "bbwxColourDialogButton.h"
+#include "bbwxColourSelectorButton.h"
 #include "bbwxPackage.h"
 
 
@@ -35,7 +35,7 @@ namespace bbwx
   
 
 //-------------------------------------------------------------------------
-wxColourPickerCtrlWidget::wxColourPickerCtrlWidget(    ColourDialogButton* box, 
+wxColourPickerCtrlWidget::wxColourPickerCtrlWidget(    ColourSelectorButton* box, 
                                                                                                        wxWindow *parent, 
                                                                                                        unsigned char  cr,
                                                                                                        unsigned char  cg,
@@ -88,7 +88,7 @@ void wxColourPickerCtrlWidget::UpdateBox()
 
     //    std::cout << col << std::endl;
 
-    ColourDialogButton* b = (ColourDialogButton*)mBox;
+    ColourSelectorButton* b = (ColourSelectorButton*)mBox;
     b->bbSetOutputOut( col );
     b->bbSignalOutputModification("Out");
 }
@@ -100,32 +100,32 @@ void wxColourPickerCtrlWidget::UpdateBox()
   //--------------------------------------------------------------------------
 
   //--------------------------------------------------------------------------
+
+  BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourSelectorButton,bbtk::WxBlackBox);
+  BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourSelectorButton);
   
-  BBTK_USER_BLACK_BOX_IMPLEMENTATION(ColourDialogButton,bbtk::WxBlackBox);
-  BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx,ColourDialogButton);
-  
-  void ColourDialogButton::bbUserConstructor() 
+  void ColourSelectorButton::bbUserConstructor() 
   { 
     bbSetInputIn("1 1 1");
   }
-  
-  
-  void ColourDialogButton::Process() 
+
+
+  void ColourSelectorButton::Process() 
   { 
-    bbtkDebugMessageInc("Process",9,"ColourDialogButton::Process()"<<std::endl);
+    bbtkDebugMessageInc("Process",9,"ColourSelectorButton::Process()"<<std::endl);
       pickerWidget->UpdateBox();
     bbtkDebugDecTab("Process",9);
   }
-  
+
 
   /**
-   * \brief  Create wxWidget . 
+   * \brief  Create wxWidget .
    *
    *
-   */ 
-  void ColourDialogButton::CreateWidget()
+   */
+  void ColourSelectorButton::CreateWidget()
   {
-    bbtkDebugMessage("Process",9,"=> ColourDialogButton::CreateWidget()"<<std::endl);
+    bbtkDebugMessage("Process",9,"=> ColourSelectorButton::CreateWidget()"<<std::endl);
     
     float r,g,b;
     sscanf( bbGetInputIn().c_str(), "%f %f %f", &r, &g ,&b);
@@ -136,7 +136,7 @@ void wxColourPickerCtrlWidget::UpdateBox()
 
     pickerWidget = new wxColourPickerCtrlWidget(this, bbGetWxParent() , cr , cg , cb );    
     
-    bbtkDebugMessage("Process",9,"<= ColourDialogButton::CreateWidget()"<<std::endl);
+    bbtkDebugMessage("Process",9,"<= ColourSelectorButton::CreateWidget()"<<std::endl);
 
     bbSetOutputWidget( pickerWidget );
   }
similarity index 66%
rename from packages/wx/src/bbwxColourDialogButton.h
rename to packages/wx/src/bbwxColourSelectorButton.h
index 4ea9f893b9823bc4f068514d5301aa74e5cb547d..0ffeb1dbdd05715508c8b372e97435086314995e 100644 (file)
@@ -1,10 +1,10 @@
 /*=========================================================================
                                                                                 
   Program:   bbtk
-  Module:    $RCSfile: bbwxColourDialogButton.h,v $
+  Module:    $RCSfile: bbwxColourSelectorButton.h,v $
   Language:  C++
-  Date:      $Date: 2008/02/14 19:19:52 $
-  Version:   $Revision: 1.2 $
+  Date:      $Date: 2008/02/20 11:36:29 $
+  Version:   $Revision: 1.1 $
                                                                                 
   Copyright (c) CREATIS (Centre de Recherche et d'Applications en Traitement de
   l'Image). All rights reserved. See Doc/License.txt or
@@ -24,7 +24,7 @@
 */
 
 /**
- * \class bbwx::ColourDialogButton
+ * \class bbwx::ColourSelectorButton
  * \brief 
 
  * \class bbwx::wxColourPickerCtrlWidget
@@ -36,8 +36,8 @@
 // Prevents multiple inclusions : use symbols of the form
 // __FILENAME_INCLUDED__ 
 // where FILENAME must be replaced by the actual file name
-#ifndef __bbwxColourDialogButton_h_INCLUDED_H__
-#define __bbwxColourDialogButton_h_INCLUDED_H__
+#ifndef __bbwxColourSelectorButton_h_INCLUDED_H__
+#define __bbwxColourSelectorButton_h_INCLUDED_H__
 
 // Include wxBlackBox definition
 #include "bbtkWxBlackBox.h"
 // bbPACKAGENAME
 namespace bbwx
 {
 
-class ColourDialogButton;
+class ColourSelectorButton;
 
 class wxColourPickerCtrlWidget :public wxPanel
 {
 
 public:
-       wxColourPickerCtrlWidget(       ColourDialogButton* box, 
-                                                               wxWindow *parent, 
-                                                               unsigned char  cr,
-                                                               unsigned char  cg,
-                                                               unsigned char  cb  );
-
-       ~wxColourPickerCtrlWidget();
-       void OnColorChange(wxColourPickerEvent& e);
-       void UpdateBox();
+   wxColourPickerCtrlWidget( ColourSelectorButton* box, 
+                             wxWindow *parent, 
+                             unsigned char  cr,
+                             unsigned char  cg,
+                             unsigned char  cb  );
+
+   ~wxColourPickerCtrlWidget();
+   void OnColorChange(wxColourPickerEvent& e);
+   void UpdateBox();
 private:
-       wxColourPickerCtrl *picker; 
-       ColourDialogButton *mBox;
+   wxColourPickerCtrl *picker; 
+   ColourSelectorButton *mBox;
 };
 //------------------------------------------------------------------------
 //------------------------------------------------------------------------
@@ -79,9 +78,9 @@ private:
 
 //------------------------------------------------------------------------
 // The black box
-  class /*BBTK_EXPORT*/ ColourDialogButton : public bbtk::WxBlackBox
+  class /*BBTK_EXPORT*/ ColourSelectorButton : public bbtk::WxBlackBox
   {    
-    BBTK_USER_BLACK_BOX_INTERFACE(ColourDialogButton,bbtk::WxBlackBox);
+    BBTK_USER_BLACK_BOX_INTERFACE(ColourSelectorButton,bbtk::WxBlackBox);
     BBTK_DECLARE_INPUT(In,std::string);
     BBTK_DECLARE_OUTPUT(Out,std::string);
     BBTK_PROCESS(Process);
@@ -90,27 +89,27 @@ private:
     void CreateWidget();
 
   protected:
-    virtual void bbUserConstructor();
+     virtual void bbUserConstructor();
  
   private:
-         wxColourPickerCtrlWidget* pickerWidget;
+     wxColourPickerCtrlWidget* pickerWidget;
   };
    
   //=================================================================
   // UserBlackBox description
-  BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourDialogButton,bbtk::WxBlackBox);
-  BBTK_NAME("ColourDialogButton");
+  BBTK_BEGIN_DESCRIBE_BLACK_BOX(ColourSelectorButton,bbtk::WxBlackBox);
+  BBTK_NAME("ColourSelectorButton");
   BBTK_AUTHOR("laurent.guigues@creatis.insa-lyon.fr");
   // Already inserted for any WxBlackBox  BBTK_CATEGORY("widget");
   BBTK_DESCRIPTION("A button which displays a colour picker dialog when clicked");
-  BBTK_INPUT(ColourDialogButton,In,"Initial colour",std::string);
-  BBTK_OUTPUT(ColourDialogButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string);
-  BBTK_END_DESCRIBE_BLACK_BOX(ColourDialogButton);
+  BBTK_INPUT(ColourSelectorButton,In,"Initial colour",std::string);
+  BBTK_OUTPUT(ColourSelectorButton,Out,"Colour choosen in format '[0,1] [0,1] [0,1]'",std::string);
+  BBTK_END_DESCRIBE_BLACK_BOX(ColourSelectorButton);
   //=================================================================
   
   
 }//namespace  bbwx
 
-#endif  // __bbwxColourDialogButton_h_INCLUDED_H__
+#endif  // __bbwxColourSelectorButton_h_INCLUDED_H__
 
 #endif //_USE_WXWIDGETS_