Version: $Revision: 1.34 $
=========================================================================*/
-
-
/**
* \file
* \brief Class bbtk::BlackBox : abstract black-box interface.
#include <boost/bind.hpp>
#include <boost/signals2/signal.hpp>
-
#define bbtkBlackBoxMessage(key,level,mess) \
bbtkMessage(key,level,"["<<bbGetTypeName()<<":"<<bbGetName()<<"] "<<mess)
#define bbtkBlackBoxDebugMessage(key,level,mess) \
BBTK_DECLARE_INPUT(WinWidth,int);
BBTK_DECLARE_INPUT(WinHeight,int);
BBTK_DECLARE_INPUT(WinDialog,bool);
+ BBTK_DECLARE_INPUT(WinMaximized,bool);
BBTK_DECLARE_INPUT(WinHide,Void);
BBTK_DECLARE_INPUT(WinClose,Void);
BBTK_DECLARE_OUTPUT(Widget,Widget*);
bool bbIsShown();
//==================================================================
-
//==================================================================
/// User callback for creating the widget associated to the box
/// ** Must be defined ** in user classes
}
//==================================================================
-
protected:
void bbSetShown(bool);
BBTK_NAME("WidgetBlackBox_"+HumanTypeName<T>());
// BBTK_DESCRIPTION("Widget box. The inputs marked with (*) are only used if the widget is not inserted in another widget.\n");
BBTK_CATEGORY("widget");
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinTitle,
- "Title of the window (*)",
- std::string);
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinWidth,
- "Width of the window (* : only used if the widget is not connected to a Layout box)",int);
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinHeight,
- "Height of the window (*)",int);
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinDialog,
- "Set to 'true' to create a dialog window, i.e. which blocks the pipeline until it is closed (modal) (*)",bool);
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinHide,
- "Any signal received hides the window (*)",Void);
- BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinClose,
- "Any signal received closes the window (*)",Void);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinTitle,"Title of the window (*)",std::string);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinWidth,"Width of the window (* : only used if the widget is not connected to a Layout box)",int);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinHeight,"Height of the window (*)",int);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinDialog,"Set to 'true' to create a dialog window, i.e. which blocks the pipeline until it is closed (modal) (*)",bool);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinHide,"Any signal received hides the window (*)",Void);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinClose,"Any signal received closes the window (*)",Void);
+ BBTK_TEMPLATE_INPUT(WidgetBlackBox,WinMaximized,"Start Application Maximazed",bool);
typedef typename WidgetBlackBox<T>::WidgetPointer WidgetPointer;
BBTK_TEMPLATE_OUTPUT(WidgetBlackBox,Widget,"Output widget",WidgetPointer);
BBTK_END_DESCRIBE_BLACK_BOX(WidgetBlackBox);
//=================================================================
-
-
-
-
-
-
-
-
} //namespace bbtk
// template code inclusion
Version: $Revision: 1.7 $
=========================================================================*/
-
-
/**
* \file
* \brief
*/
-
-
//#include "bbtkWidgetBlackBoxWindow.h"
#include "bbtkBlackBoxOutputConnector.h"
-
namespace bbtk
{
bbSetInputWinTitle(bbGetName());
bbSetInputWinWidth(800);
bbSetInputWinHeight(800);
+ bbSetInputWinMaximized(false);
bbSetInputWinDialog(false);
bbSetOutputWidget(0);
}
//==================================================================
void WtBlackBox::bbShowWindow()
- {
- if ((bbmWindow) && (!bbIsShown()))
+{
+ if ((bbmWindow) && (!bbIsShown()))
{
- bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbShowWindow()"
- <<std::endl);
- if (bbGetInputWinDialog())
- {
- // ((WxDialog*)bbmWindow)->ShowModal();
- }
- else
- {
- // There is not such a thing like show becouse it is a webapp
- // bbGetWindow()->Show();
- // WWt::CreateWtAppIfNeeded();
-
-
- Wt::WRun(WtBlackBox::wtServerData::argc,
- WtBlackBox::wtServerData::argv,
- &createApplication);
-
-
- bbSetShown(true);
- }
- }
+ bbtkBlackBoxDebugMessage("widget",3,"==> WtBlackBox::bbShowWindow()"
+ <<std::endl);
+ if (bbGetInputWinDialog())
+ {
+ // ((WxDialog*)bbmWindow)->ShowModal();
+ } else {
+ // There is not such a thing like show becouse it is a webapp
+ // bbGetWindow()->Show();
+ // WWt::CreateWtAppIfNeeded();
+ Wt::WRun(WtBlackBox::wtServerData::argc,
+ WtBlackBox::wtServerData::argv,
+ &createApplication);
+ bbSetShown(true);
+ } // if WinDialog
+ } // if bbmWindow && !bbIsShown
}
- //==================================================================
+ //==================================================================
//==================================================================
void WtBlackBox::bbDestroyWindow()
Version: $Revision: 1.45 $
=========================================================================*/
-
-
#ifdef _USE_WXWIDGETS_
/**
~WxFrame();
void OnCloseWindow(wxCloseEvent& event);
-
WxBlackBox::WeakPointer mBox;
DECLARE_EVENT_TABLE();
wxSYSTEM_MENU |
wxCLOSE_BOX |
wxMAXIMIZE_BOX |
- wxMINIMIZE_BOX |
+ wxMINIMIZE_BOX | wxFRAME_FLOAT_ON_PARENT |
wxCAPTION
),
mBox(b)
Layout();
}
//==================================================================
+
//==================================================================
WxFrame::~WxFrame()
- {
-
-printf("EED WxFrame::~WxFrame\n");
-
+ {
+printf("EED WxFrame::~WxFrame\n");
if (mBox.lock())
{
bbtkDebugMessage("widget",9,"["<<mBox.lock()->bbGetName()
wxSize size);
~WxDialog();
void OnCloseWindow(wxCloseEvent& event);
-
-
WxBlackBox::WeakPointer mBox;
DECLARE_EVENT_TABLE();
wxSYSTEM_MENU |
wxCLOSE_BOX |
wxMAXIMIZE_BOX |
- wxMINIMIZE_BOX |
- wxCAPTION
+ wxMINIMIZE_BOX | wxSTAY_ON_TOP |
+ wxCAPTION
),
mBox(b)
{
Version: $Revision: 1.33 $
========================================================================*/
-
-
/**
* \brief Short description in one line
*
* \brief
*/
-
#ifdef USE_WXWIDGETS
-
#ifndef __bbtkWxBlackBox_h__
#define __bbtkWxBlackBox_h__
-
-
#include "bbtkWidgetBlackBox.h"
#include "bbtkWx.h"
-
namespace bbtk
{
-
-
//==================================================================
/// Widget black boxes
//EED 10/06/2009 /*BBTK_EXPORT*/
public:
BBTK_BLACK_BOX_INTERFACE(WxBlackBox,bbtk::WidgetBlackBox<wxWindow>);
-
// protected:
-
public:
//==================================================================
virtual void bbCreateFrameWindow();
//==================================================================
-
//==================================================================
wxWindow* bbGetWindow() { return bbmWindow; }
void bbSetWindow(wxWindow*) ;
bool bbWindowIsCreated() { return (bbGetWindow() != 0); }
//==================================================================
-
//==================================================================
virtual void bbShowWindow();
//==================================================================
virtual std::string ConstructWinTitle();
private:
-
wxWindow* bbmWindow;
-
};
//=================================================================
-
//=================================================================
// WxBlackBoxDescriptor declaration
class WxBlackBoxDescriptor : public WidgetBlackBoxDescriptor<wxWindow>
BBTK_END_DESCRIBE_BLACK_BOX(WxBlackBox);
//=================================================================
-
} //namespace bbtk
#endif //__bbtkWxBlackBox_h__
Version: $Revision: 1.4 $
=========================================================================*/
-
-
-
/**
* \file
* \brief
*/
-
#ifdef USE_QT
#include "bbqtLayoutLine.h"
{
for (i=0;i<4;i++)
{
- m->SetElement(i,j,manaulMatrixIn[ii]);
+ m->SetElement(j,i,manaulMatrixIn[ii]);
ii++;
}// for i
} // for j
Version: $Revision: 1.10 $
=========================================================================*/
-
/**
* \file
* \brief
*/
-
#ifdef _USE_WXWIDGETS_
#include "bbwxLayoutLine.h"
#include "bbwxPackage.h"
#include "bbtkUtilities.h"
-
namespace bbwx
{
BBTK_ADD_BLACK_BOX_TO_PACKAGE(wx, LayoutLine);
bbSetInputWidget9(NULL);
}
- //-----------------------------------------------------------------
- void LayoutLine::bbUserInitializeProcessing()
- {
- }
-
- //-----------------------------------------------------------------
- void LayoutLine::bbUserFinalizeProcessing()
- {
- }
+//-----------------------------------------------------------------
+void LayoutLine::bbUserInitializeProcessing()
+{
+}
+//-----------------------------------------------------------------
+void LayoutLine::bbUserFinalizeProcessing()
+{
+}
void LayoutLine::Process()
{
- PutWinTitle();
+ PutWinTitle();
+
+ if (bbGetInputWinMaximized()==true)
+ {
+ wxWindow *ww = bbGetOutputWidget();
+ while (ww->GetParent()!=NULL)
+ {
+ ww = ww->GetParent();
+ } // while
+ wxFrame *f = (wxFrame*)ww;
+ f->Iconize(false);
+ f->Maximize(true);
+ f->Raise();
+ f->Show(true);
+ f->SetFocus();
+ }// if
}
-
-
+
/*
void LayoutLine::TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer)
{
w -> SetAutoLayout(true);
w -> Layout();
bbSetOutputWidget( w );
+
}
// This callback is necessary to get actual processing of the view
* \class bbtk::NodePatern
* \brief Pattern for the definition of a new type of Node
*/
-
-
#ifdef USE_WXWIDGETS
-
#ifndef __bbWxLayoutLine_h__
#define __bbWxLayoutLine_h__
#include "bbtkWxBlackBox.h"
#include "bbwx_EXPORT.h"
-
namespace bbwx
{
-
-
-
//===========================================================
class bbwx_EXPORT LayoutLine : public bbtk::WxBlackBox
{
-
BBTK_BLACK_BOX_INTERFACE(LayoutLine,bbtk::WxBlackBox);
BBTK_DECLARE_INPUT(Widget1,wxWindow*);
BBTK_DECLARE_INPUT(Widget2,wxWindow*);
BBTK_PROCESS(Process);
BBTK_CREATE_WIDGET(CreateWidget);
BBTK_ON_SHOW_WIDGET(OnShowWidget);
-
void Process();
void CreateWidget(wxWindow*);
void OnShowWidget();
-
protected:
void TryInsertWindow(wxWindow *parent, wxWindow *w,wxBoxSizer *sizer);
-
};
//===========================================================
-
-
+
//=================================================================
// BlackBox description
BBTK_BEGIN_DESCRIBE_BLACK_BOX(LayoutLine,bbtk::WxBlackBox);
BBTK_INPUT(LayoutLine,Orientation,"Orientation (default V), 0=H=HORIZONTAL , 1=V=VERTICAL",std::string,"");
BBTK_END_DESCRIBE_BLACK_BOX(LayoutLine);
//=================================================================
-
-
-
}
-
-
-
//namespace bbtk
#endif //__bbtkWxLayoutLine_h__
Date: $Date: 2012/11/16 08:52:14 $
Version: $Revision: 1.12 $
=========================================================================*/
-
/**
* \file
* \brief
*/
-
-
#ifdef _USE_WXWIDGETS_
-
#include "bbwxLayoutTab.h"
#include "bbwxPackage.h"
#include "bbtkUtilities.h"
#include "bbtkBlackBoxInputConnector.h"
-
-
namespace bbwx
{
-
-
//--------------------------------------------------------------------------
class TabWidget : public wxPanel
{
wxNotebook *mwxNotebook;
};
-
TabWidget::TabWidget(LayoutTab* box, wxWindow *parent,long style )
: wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL),
mBox(box)