示例#1
0
	GWEN_CONTROL_INLINE( PanelListPanel, GUnit )
	{
		m_PLP = new Gwen::Controls::PanelListPanel( this );
		m_PLP->Dock( Pos::Fill );
		m_PLP->SetPadding( Gwen::Padding( 10, 10 ));
		m_PLP->SetVertical();
		m_PLP->SetSizeToChildren( false );

		for ( int i = 0; i < 16; i++)
		{
			Gwen::String testName = "TEST" +  Utility::ToString( i );
			Gwen::Controls::Button* testButton =  new Gwen::Controls::Button( m_PLP );
			testButton->SetText( testName );
		}

		Gwen::Controls::StatusBar* pStatus = new Gwen::Controls::StatusBar( this );
		pStatus->Dock( Pos::Bottom );

		{
			Gwen::Controls::Button* pButton = new Gwen::Controls::Button( pStatus );
			pButton->SetText( "Horizontal" );
			pButton->onPress.Add( this, &PanelListPanel::GoHorizontal );
			pStatus->AddControl( pButton, false );
		}

		{
			Gwen::Controls::Button* pButton = new Gwen::Controls::Button( pStatus );
			pButton->SetText( "Vertical" );
			pButton->onPress.Add( this, &PanelListPanel::GoVertical );
			pStatus->AddControl( pButton, true );
		}
	}
示例#2
0
		GWEN_CONTROL_INLINE( CrossSplitter, GUnit )
		{
			Dock( Pos::Fill );
			m_bSplittersVisible = false;
			m_iCurZoom = 0;
			m_Splitter = new Gwen::Controls::CrossSplitter( this );
			m_Splitter->SetPos( 0, 0 );
			m_Splitter->Dock( Pos::Fill );
			{
				Gwen::Controls::Button* testButton =  new Gwen::Controls::Button( m_Splitter );
				testButton->SetText( "TOPLEFT" );
				m_Splitter->SetPanel( 0, testButton );
			}
			{
				Gwen::Controls::Button* testButton =  new Gwen::Controls::Button( m_Splitter );
				testButton->SetText( "TOPRIGHT" );
				m_Splitter->SetPanel( 1, testButton );
			}
			{
				Gwen::Controls::Button* testButton =  new Gwen::Controls::Button( m_Splitter );
				testButton->SetText( "BOTTOMRIGHT" );
				m_Splitter->SetPanel( 2, testButton );
			}
			{
				Gwen::Controls::Button* testButton =  new Gwen::Controls::Button( m_Splitter );
				testButton->SetText( "BOTTOMLEFT" );
				m_Splitter->SetPanel( 3, testButton );
			}
			//Status bar to hold unit testing buttons
			Gwen::Controls::StatusBar* pStatus = new Gwen::Controls::StatusBar( this );
			pStatus->Dock( Pos::Bottom );
			{
				Gwen::Controls::Button* pButton = new Gwen::Controls::Button( pStatus );
				pButton->SetText( "Zoom" );
				pButton->onPress.Add( this, &CrossSplitter::ZoomTest );
				pStatus->AddControl( pButton, false );
			}
			{
				Gwen::Controls::Button* pButton = new Gwen::Controls::Button( pStatus );
				pButton->SetText( "UnZoom" );
				pButton->onPress.Add( this, &CrossSplitter::UnZoomTest );
				pStatus->AddControl( pButton, false );
			}
			{
				Gwen::Controls::Button* pButton = new Gwen::Controls::Button( pStatus );
				pButton->SetText( "CenterPanels" );
				pButton->onPress.Add( this, &CrossSplitter::CenterPanels );
				pStatus->AddControl( pButton, true );
			}
		}