* @file buttonGroup.cxx
* @brief Implements the ButtonGroup class.
* @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date 2011-05-24
+ * @date 2011-05-28
*/
#include "buttonContainerPanel.h"
{
namespace view
{
+ BEGIN_EVENT_TABLE(ButtonContainerPanel,wxScrolledWindow)
+ //(*EventTable(ButtonContainerPanel)
+ //*)
+ END_EVENT_TABLE()
+
// ----------------------------------------------------------------------------------
ButtonContainerPanel::ButtonContainerPanel( wxWindow* parent,
ButtonGroupSettings* settings ) :
parent,
-1,
wxDefaultPosition,
- wxSize( 400, 400 ),
+ wxDefaultSize,
wxTAB_TRAVERSAL | wxVSCROLL | wxHSCROLL
| wxFULL_REPAINT_ON_RESIZE, _T("creaButtonContainer") )
{
* @file creaPanelButtonContainer.h
* @brief implements PanelButtonContainer class
* @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date 2011-05-24
+ * @date 2011-05-28
*/
#include "creaPanelButtonContainer.h"
namespace creaPanelButtonContainer
{
+ BEGIN_EVENT_TABLE(PanelButtonContainer,wxPanel)
+ //(*EventTable(ButtonContainerPanel)
+ //*)
+ END_EVENT_TABLE()
// ----------------------------------------------------------------------------------
typedef creaButtonContainer::model::TConcreteFunctor< PanelButtonContainer >
TConcreteFunctor;
// ----------------------------------------------------------------------------------
PanelButtonContainer::PanelButtonContainer( wxWindow* parent,
ButtonContainerSettings* bcSettings ) :
- wxPanel( parent, -1, wxDefaultPosition, wxSize( 300, 700 ),
+ wxPanel( parent, -1, wxDefaultPosition, wxDefaultSize,
wxDEFAULT_FRAME_STYLE, _T("creaPanelButtonContainer") )
{
this->m_ButtonContainerSettings = bcSettings;
//Using AuiManager to Manage the Panels
this->m_AuiManager = new wxAuiManager( this, wxAUI_MGR_DEFAULT );
- // CartoSettingsPanel Management
this->m_AuiManager->AddPane(
this->m_ButtonPanel,
- wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("Panel") ). CaptionVisible( ).CloseButton(
- false ).Left( ).MinSize( wxSize( 300, 300 ) ) );
-
+ wxAuiPaneInfo( ).Name( _T("ButtonPanel") ).Caption( _("Panel") ). CaptionVisible(
+ true ).CloseButton( false ).Bottom( ).Resizable( true ) );
//CartoButtonPanel Management
this->m_AuiManager->AddPane(
this->m_ButtonContainerPanel,
wxAuiPaneInfo( ).Name( _T("creaButtonContainer") ).Caption(
- _("creaButtonContainer") ). CaptionVisible( ).CloseButton( false ).Left( ) .MinSize(
- wxSize( 300, 300 ) ) );
+ _("creaButtonContainer") ). CaptionVisible( false ).CloseButton(
+ false ).Center( ).Resizable( true ) );
this->m_AuiManager->Update( );
}
// ----------------------------------------------------------------------------------
//Finding the CartoSettingsPanel of the ButtonClicket
this->m_ButtonPanel = this->m_ButtonContainerSettings->GetPanelButton(
buttonName );
+ //changing the parent of the panel!
+ if ( this->m_ButtonPanel->GetParent( ) != this )
+ this->m_ButtonPanel->Reparent( this );
//CartoSettingsPanel Management
this->m_AuiManager->GetPane( _T("ButtonPanel") ).window
= this->m_ButtonPanel;
std::cerr
<< "PanelButtonContainer::UpdatePanel( const std::string &buttonName )"
<< "exception: " << e.what( ) << std::endl;
- std::cout<<"Maybe the panel of the button is NULL"<<std::endl;
- exit(1);
+ std::cout << "Maybe the panel of the button is NULL" << std::endl;
+ exit( 1 );
}//hctac
}
// ----------------------------------------------------------------------------------
* @file PanelButtonContainer
* @brief This contains the ButtonContainerSettings class.
* @author Diego CACERES (diego.caceres[AT]creatis.insa-lyon.fr)
- * @date 2011-05-24
+ * @date 2011-05-28
*/
#ifndef PANELBUTTONCONTAINER_H_
void
UpdatePanel( const std::string &buttonName );
// ----------------------------------------------------------------------------------
- /*! @fn
+ /*! @fn void GenericButtonEvent( const std::string &buttonName );
* @brief This method is the function that calls the panels contained in the buttons
* (in creaButtonContainer is the function contained in the functors to be called back.
* @param buttonName
ButtonContainerPanel* m_ButtonContainerPanel; //!<This is the panel with de buttons (creaButtonContainer)
wxAuiManager* m_AuiManager; //!<The AUI Manager for the panels.
wxPanel* m_ButtonPanel; //!<This is the panel used to contain the panels of the buttons. (it changes with the buttonAction)
+ DECLARE_EVENT_TABLE() //!<Event Table declaration.
};
}//ecapseman