void CGameReviewDialog::OnExpandCollapse() 
{
	if (m_bCollapsed)
	{
		// expand window
		CollapseWindow(FALSE);
	}
	else
	{
		// collapse window window
		CollapseWindow(TRUE);
	}
	//
	theApp.SetValue(tbCollapseGameReviewDialog, m_bCollapsed);
}
Exemple #2
0
void _glfwPlatformRestoreWindow( void )
{
    if( !_glfwWin.fullscreen )
    {
        (void)CollapseWindow( _glfwWin.window, FALSE );
    }
}
Exemple #3
0
void _glfwPlatformIconifyWindow( void )
{
    if( !_glfwWin.fullscreen )
    {
        (void)CollapseWindow( _glfwWin.window, TRUE );
    }
}
BOOL CGameReviewDialog::OnInitDialog() 
{
	// first call base class
	CMyCustomDialog::OnInitDialog();

	// init the tags list control
	const int tnColSpacer = 14;
	m_listTags.InsertColumn(0, "Tag", LVCFMT_LEFT, m_listTags.GetStringWidth("Tag               ") + tnColSpacer, 0);
	m_listTags.InsertColumn(1, "Value", LVCFMT_LEFT, m_listTags.GetStringWidth("Value                                  ") + tnColSpacer, 1);

	// subclass buttons
	for(int i=0;i<tnumButtons;i++)
	{
		m_flatButtons[i].SubclassDlgItem(tControlInfo[i].nControlID, this);
		if (tControlInfo[i].nIconID != 0)
			m_flatButtons[i].SetIcon(tControlInfo[i].nIconID);
		if (i < 9)
			m_flatButtons[i].SetShowText(FALSE);
	}

	// subclass listbox
	CListBox* pList = (CListBox*) GetDlgItem(IDC_GAME_INDEX);
	wpOrigListBoxProc = (WNDPROC) SetWindowLong(pList->GetSafeHwnd(), GWL_WNDPROC, (LONG) ListBoxSubclassProc);

	// get the full width
	CRect windowRect;
	GetWindowRect(&windowRect);
	m_nFullWidth = windowRect.Width();

	// and the collapsed width
	CRect btnRect;
	GetDlgItem(IDC_FIRST)->GetWindowRect(&btnRect);
	int nSpace = btnRect.left - windowRect.left;
	GetDlgItem(IDC_PLAY)->GetWindowRect(&btnRect);
	m_nCollapsedWidth = btnRect.right + nSpace - windowRect.left;

	// load expand.collapsed icons
	m_hIconExpand = (HICON) LoadImage(theApp.m_hInstance, MAKEINTRESOURCE(IDI_TAGS_EXPAND),
										IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);
	m_hIconCollapse = (HICON) LoadImage(theApp.m_hInstance, MAKEINTRESOURCE(IDI_TAGS_COLLAPSE),
										IMAGE_ICON, 0, 0, LR_DEFAULTCOLOR);

	// collapse if desired
	m_bCollapsed = theApp.GetValue(tbCollapseGameReviewDialog);
	CollapseWindow(m_bCollapsed);

	// done
//	m_bInitialized = TRUE;
	return TRUE;  // return TRUE unless you set the focus to a control
	              // EXCEPTION: OCX Property Pages should return FALSE
}
void _glfwMacDWRestoreWindow( void )
{
    // TO DO: What if we fail here?
    (void)CollapseWindow( _glfwWin.MacWindow,
                          FALSE );
}
void _glfwMacDWIconifyWindow( void )
{
    // TO DO: What if we fail here?
    (void)CollapseWindow( _glfwWin.MacWindow,
                          TRUE );
}
Exemple #7
0
void wxTopLevelWindowMac::Iconize(bool iconize)
{
    if ( IsWindowCollapsable((WindowRef)m_macWindow) )
        CollapseWindow((WindowRef)m_macWindow , iconize ) ;
}
Exemple #8
0
void shellwindowmenuselect (short ixmenu) {
	
	/*
	implemented using a side-effect we programmed into the update process for
	the window menu.
	
	as the menu is being built pushwindowmenuvisit watches for the indicated
	item number, when found it sets the global hsearch.  that's the one we
	want to bring to the front.
	
	5.0a2 dmb: new hidewindow item
	
	7.0b44 PBS: Minimize Window item on Mac OS X.
	*/
	
	boolean flcommand = false;
	
	flwindowmenudirty = true; /*force update*/
	
	if (ixmenu == hidewindowitem) {
		hdlwindowinfo hinfo;
		
		if (getfrontwindowinfo (&hinfo))
			shellhidewindow (hinfo);
		}
	else {
	
		#if TARGET_API_MAC_CARBON == 1
		
			if (ixmenu == minimizewindowitem) {
				
				hdlwindowinfo hinfo;
		
				flcommand = true;
							
				if (getfrontwindowinfo (&hinfo))
				
					CollapseWindow ((**hinfo).macwindow, true);				
				} /*if*/
			
			if (ixmenu == bringalltofrontwindowitem) {
				
				activateapplication (nil); /*nil means self*/
				
				flcommand = true;
				} /*if*/
				
		#endif
		
		if (!flcommand) {

			ixsearch = ixmenu; /*set global*/
			
			hsearch = nil; /*indicate it wasn't found*/
			
			shellupdatewindowmenu (); /*for side-effect*/
			
			if (hsearch != nil) /*it was found*/
				shellbringtofront (hsearch);
			else
				ouch ();
			} /*if*/
		}
	} /*shellwindowmenuselect*/