Пример #1
0
CommanderWindow::CommanderWindow( Rect frame )
: Window( frame, "commander"  )
{
	
	View *view			= NULL;
	Button *button 		= NULL;
   
	// Set up the top bar.
	view = new View( Rect(0,0,Bounds().Width() - 1, 49 ), FOLLOW_LEFT_RIGHT ); 
	view->SetBackgroundColour( 0x404040 );


		button = new Button( "UP", new Pulse( PULSE_UP ), Rect( 10,10, 40, 40 ) );	
		view->AddChild( button );
	/*
		button = new Button( "BACK", new Pulse( PULSE_BACK ), Rect( 10,10, 40, 40 ) );	
		view->AddChild( button );
	*/

	/*
		button = new Button( "UP", new Pulse( PULSE_UP ), Rect( 60,10, 90, 40 ) );	
		view->AddChild( button );
	*/

		button = new Button( "Refresh", new Pulse( PULSE_REFRESH ), Rect( Bounds().Width() - 50,10,  Bounds().Width() - 10, 40 ) );	
		view->AddChild( button );

		  
	AddChild( view );


	// Set up the URL bar.
	
	view = new View( Rect(0,50,Bounds().Width() - 1, 74), FOLLOW_LEFT_RIGHT );
	view->SetBackgroundColour( 0x303030 );


		input = new TextInput( Rect( 17, 2, Bounds().Width() - 38, 22 ), FOLLOW_LEFT_RIGHT );
		input->SetText( "/" );
		view->AddChild( input );

		button = new Button( "GO", new Pulse( PULSE_LOAD ), Rect( Bounds().Width() - 37, 2, Bounds().Width() - 17, 22 ) );
		view->AddChild( button );

	AddChild( view );

	// Set up the file list view

	list = new ListView( 
					Rect(0,75,Bounds().Width() - 1, Bounds().Height() - 1), 
					new Pulse( PULSE_SELECT ),
					FOLLOW_LEFT_RIGHT );
	list->SetBackgroundColour( 0x303050 );
	

	AddChild( list );
}