Program: bbtk
Module: $RCSfile: bbtkKWBlackBox.h,v $
Language: C++
- Date: $Date: 2008/11/29 21:41:34 $
- Version: $Revision: 1.1 $
+ Date: $Date: 2008/12/02 08:38:08 $
+ Version: $Revision: 1.2 $
========================================================================*/
#include "bbtkKW.h"
-#include "vtkKWWidget.h"
-#include "vtkKWWindowBase.h"
-#include "vtkKWFrame.h"
-#include "vtkKWDialog.h"
-
-namespace bbtk
-{
-
-
//==================================================================
// Forward declaration of the class of window associated to a KWBlackBox
class vtkKWBlackBoxWindow;
+ class vtkKWBlackBoxDialog;
//==================================================================
+
+namespace bbtk
+{
+
+
+
+
//==================================================================
// Forward declaration of the widget event handler class
// class KWBlackBoxWidgetEventHandler;
virtual void bbExecute(bool force = false);
- typedef vtkKWBlackBoxWindow Window;
+ typedef vtkKWBlackBoxDialog Window;
/// Returns the **OWN** window associated to the box
/// If 0 returned = no window
// LG 24/11/08 : New widget pipeline
// void bbCreateWidgetAndEventHandler(vtkKWWidget* parent);
+ /// Sets the window
+ inline void bbSetWindow(Window* w) { bbmWindow=w; }
protected:
friend class vtkKWBlackBoxWindow;
// friend class KWBlackBoxWidgetEventHandler;
- /// Sets the window
- inline void bbSetWindow(Window* w) { bbmWindow=w; }
-
+
/*
/// Sets the Widget Event Handler
inline void bbSetWidgetEventHandler(KWBlackBoxWidgetEventHandler* w)
-
- //==================================================================
- // The base of the hierarchy of windows associated to a KWBlackBox
- class BBTK_EXPORT vtkKWBlackBoxWindow
- {
- public:
- vtkKWBlackBoxWindow();
- virtual ~vtkKWBlackBoxWindow();
- virtual void bbShow();
- virtual void bbHide();
- virtual void bbClose();
- bool bbIsShown() { return mShown; }
- void bbSetBlackBox(KWBlackBox::Pointer box)
- {
- mBox = box;
- mBox.lock()->bbSetWindow(this);
- }
- virtual KWBlackBox::Pointer bbGetBlackBox() { return mBox.lock(); }
- private:
- KWBlackBox::WeakPointer mBox;
- bool mShown;
- };
- //==================================================================
-
-
- //==================================================================
- // Dialog window which is modal
- // Name of window must not begin with uppercase letter
- class BBTK_EXPORT vtkKWBlackBoxDialog : public vtkKWDialog,
- public vtkKWBlackBoxWindow
- {
- public:
- static vtkKWBlackBoxDialog* New();
- vtkTypeRevisionMacro(vtkKWBlackBoxDialog,vtkKWDialog);
- void bbShow();
- void bbHide();
- void bbClose();
- void Cancel();
- protected:
- vtkKWBlackBoxDialog();
- ~vtkKWBlackBoxDialog();
- private:
- vtkKWBlackBoxDialog(const vtkKWBlackBoxDialog&); // Not implemented.
- void operator=(const vtkKWBlackBoxDialog&); // Not implemented.
- };
- //==================================================================
-
- //==================================================================
- // Frame window which is not modal
- class BBTK_EXPORT vtkKWBlackBoxFrame : public vtkKWWindowBase,
- public vtkKWBlackBoxWindow
- {
- public:
- static vtkKWBlackBoxFrame* New();
- vtkTypeRevisionMacro(vtkKWBlackBoxFrame,vtkKWWindowBase);
- void bbShow();
- void bbHide();
- void bbClose();
- protected:
- vtkKWBlackBoxFrame();
- ~vtkKWBlackBoxFrame();
- private:
- vtkKWBlackBoxFrame(const vtkKWBlackBoxFrame&); // Not implemented.
- void operator=(const vtkKWBlackBoxFrame&); // Not implemented.
- };
- //==================================================================
-
-
/*
//=================================================================
// Handles the destroy events of a widget associated to a KWBlackBox