コード例 #1
0
ファイル: stackview.cpp プロジェクト: alilloyd/livecode
void MCStack::view_setfullscreenmode(MCStackFullscreenMode p_mode)
{
	m_view_fullscreenmode = p_mode;
	
	// IM-2014-01-16: [[ StackScale ]] Update view transform after changing view property
	view_update_transform();
}
コード例 #2
0
ファイル: stackview.cpp プロジェクト: elphinkuo/livecode
void MCStack::view_set_content_scale(MCGFloat p_scale)
{
	m_view_content_scale = p_scale;
	
	// IM-2014-01-16: [[ StackScale ]] Update view transform after changing view property
	view_update_transform();
}
コード例 #3
0
ファイル: stackview.cpp プロジェクト: alilloyd/livecode
MCRectangle MCStack::view_setstackviewport(const MCRectangle &p_rect)
{
	m_view_requested_stack_rect = p_rect;

	// IM-2014-01-16: [[ StackScale ]] Update view transform after changing view property
	view_update_transform();
	
	return m_view_adjusted_stack_rect;
}
コード例 #4
0
ファイル: stackview.cpp プロジェクト: alilloyd/livecode
void MCStack::view_set_content_scale(MCGFloat p_scale)
{
	if (m_view_content_scale == p_scale)
		return;
	
	m_view_content_scale = p_scale;
	
	// IM-2014-01-16: [[ StackScale ]] Update view transform after changing view property
	view_update_transform();
	// IM-2014-10-22: [[ Bug 13746 ]] Update window mask when stack scale changes
	loadwindowshape();
}
コード例 #5
0
ファイル: stackview.cpp プロジェクト: alilloyd/livecode
void MCStack::view_configure(bool p_user)
{
	MCRectangle t_view_rect;
	mode_getrealrect(t_view_rect);

	// IM-2014-09-23: [[ Bug 13349 ]] If window geometry change occurs while there's a pending resize
	//    then use the requested rect rather than the new one.
	if (m_view_need_resize)
		t_view_rect = m_view_rect;
	
	if (!MCU_equal_rect(t_view_rect, m_view_rect))
	{
		// IM-2014-02-13: [[ StackScale ]] Test if the view size has changed
		bool t_resize;
		t_resize = t_view_rect.width != m_view_rect.width || t_view_rect.height != m_view_rect.height;
		
		m_view_rect = t_view_rect;
		
		view_on_rect_changed();
		
		if (view_getfullscreen())
		{
			// IM-2014-01-16: [[ StackScale ]] recalculate fullscreenmode transform after view rect change
			view_update_transform();
		}
		else
		{
			uint32_t t_current_width, t_current_height;
			t_current_width = m_view_adjusted_stack_rect.width;
			t_current_height = m_view_adjusted_stack_rect.height;
			
			// IM-2014-01-16: [[ StackScale ]] set the stack rects to the scaled down view rect
			m_view_requested_stack_rect = m_view_adjusted_stack_rect = MCRectangleGetTransformedBounds(m_view_rect, MCGAffineTransformInvert(m_view_transform));
			
			// IM-2014-02-13: [[ StackScale ]] If the view size has not changed then make sure
			//   the stack size also remains the same
			if (!t_resize)
			{
				//restore current logical width & height
				m_view_requested_stack_rect.width = m_view_adjusted_stack_rect.width = t_current_width;
				m_view_requested_stack_rect.height = m_view_adjusted_stack_rect.height = t_current_height;
			}
			
			// IM-2014-02-06: [[ ShowAll ]] Update the visible stack rect
			m_view_stack_visible_rect = MCRectangleMake(0, 0, m_view_adjusted_stack_rect.width, m_view_adjusted_stack_rect.height);
		}
	}
	configure(p_user);
}
コード例 #6
0
ファイル: stackview.cpp プロジェクト: elphinkuo/livecode
void MCStack::view_setfullscreen(bool p_fullscreen)
{
	bool t_fullscreen = view_getfullscreen();
	
	m_view_fullscreen = p_fullscreen;
	
	// IM-2014-01-16: [[ StackScale ]] Reopen the window after changing fullscreen
	if (t_fullscreen != view_getfullscreen())
	{
		reopenwindow();
		
		// IM-2014-01-16: [[ StackScale ]] Update view transform after changing view property
		view_update_transform();
	}
}