예제 #1
0
void FePresent::toggle_rotate( FeSettings::RotationState r )
{
	if ( m_toggleRotation != FeSettings::RotateNone )
		m_toggleRotation = FeSettings::RotateNone;
	else
		m_toggleRotation = r;

	set_transforms();
}
예제 #2
0
void FePresent::set_preserve_aspect_ratio( bool p )
{
    if ( p != m_preserve_aspect )
    {
        m_preserve_aspect = p;
        set_transforms();
        flag_redraw();
    }
}
예제 #3
0
void FePresent::set_layout_height( int h )
{
	m_layoutSize.y = h;
	m_layoutScale.y = (float) m_mon[0].size.y / h;

	for ( std::vector<FeBasePresentable *>::iterator itr=m_mon[0].elements.begin();
			itr!=m_mon[0].elements.end(); ++itr )
		(*itr)->set_scale_factor( m_layoutScale.x, m_layoutScale.y );

	set_transforms();
	flag_redraw();
}
예제 #4
0
void FePresent::load_layout( bool initial_load )
{
	int var = ( m_feSettings->get_present_state() == FeSettings::ScreenSaver_Showing )
			? FromToScreenSaver : FromToNoValue;

	if ( !initial_load )
		on_transition( EndLayout, FromToNoValue );
	else
		var = FromToFrontend;

	clear();
	m_baseRotation = FeSettings::RotateNone;

	set_transforms();
	m_feSettings->set_present_state( FeSettings::Layout_Showing );

	if ( m_feSettings->displays_count() < 1 )
		return;

	//
	// Run the script which actually sets up the layout
	//
	m_layoutTimer.restart();
	on_new_layout();

	// make things usable if the layout is empty
	//
	bool empty_layout=true;
	for ( std::vector<FeBasePresentable *>::iterator itr=m_mon[0].elements.begin(); itr!=m_mon[0].elements.end(); ++itr )
	{
		if ( (*itr)->get_visible() )
		{
			empty_layout=false;
			break;
		}
	}

	if ( empty_layout )
	{
		std::cout << " - Layout is empty, initializing with the default layout settings" << std::endl;
		init_with_default_layout();
	}

	update_to_new_list( FromToNoValue, true );
	on_transition( StartLayout, var );
}
예제 #5
0
void FePresent::load_screensaver()
{
	on_transition( EndLayout, FromToScreenSaver );
	clear();
	set_transforms();
	m_feSettings->set_present_state( FeSettings::ScreenSaver_Showing );

	//
	// Run the script which actually sets up the screensaver
	//
	m_layoutTimer.restart();
	on_new_layout();

	//
	// if there is no screen saver script then do a blank screen
	//
	update( true, true );
	on_transition( StartLayout, FromToNoValue );
}
예제 #6
0
// return false if the into should be cancelled
bool FePresent::load_intro()
{
	clear();
	m_baseRotation = FeSettings::RotateNone;
	set_transforms();
	m_feSettings->set_present_state( FeSettings::Intro_Showing );

	m_layoutTimer.restart();
	if ( !on_new_layout() )
		return false;

	bool retval = false;
	for ( std::vector<FeBasePresentable *>::iterator itr=m_mon[0].elements.begin();
			itr!=m_mon[0].elements.end(); ++itr )
	{
		if ( (*itr)->get_visible() )
			retval = true;
	}


	update( true, true );
	on_transition( StartLayout, FromToNoValue );
	return retval;
}
예제 #7
0
void FePresent::set_toggle_rotation( int r )
{
	m_toggleRotation = (FeSettings::RotationState)r;
	set_transforms();
	flag_redraw();
}
예제 #8
0
void FePresent::set_layout_height( int h )
{
    m_layoutSize.y = h;
    set_transforms();
    flag_redraw();
}
예제 #9
0
void FePresent::set_layout_width( int w )
{
    m_layoutSize.x = w;
    set_transforms();
    flag_redraw();
}