CBitmapFont::CBitmapFont(void) { SetFontImageID(-1); SetNumCols(0); SetCharWidth(0); SetCharHeight(0); }
//////////////////////////////////////////////////////////// // QueueListBox //////////////////////////////////////////////////////////// QueueListBox::QueueListBox(const std::string& drop_type_str, const std::string& prompt_str) : CUIListBox(), m_drop_point(end()), m_show_drop_point(false), m_order_issuing_enabled(true), m_showing_prompt(false), m_prompt_str(prompt_str) { if (!drop_type_str.empty()) AllowDropType(drop_type_str); GG::Connect(BeforeInsertSignal, &QueueListBox::EnsurePromptHiddenSlot, this); GG::Connect(AfterEraseSignal, &QueueListBox::ShowPromptConditionallySlot, this); GG::Connect(ClearedSignal, &QueueListBox::ShowPromptSlot, this); GG::Connect(GG::ListBox::RightClickedSignal, &QueueListBox::ItemRightClicked, this); // preinitialize listbox/row column widths, because what // ListBox::Insert does on default is not suitable for this case SetNumCols(1); SetColWidth(0, GG::X0); LockColWidths(); NormalizeRowsOnInsert(false); ShowPromptSlot(); }
PlayerListBox(void) : CUIListBox() { // preinitialize listbox/row column widths, because what // ListBox::Insert does on default is not suitable for this case SetNumCols(1); SetColWidth(0, GG::X0); LockColWidths(); }
SaveFileListBox() : CUIListBox ( GG::X0, GG::Y0, GG::X1, GG::Y1 ) { SetNumCols ( 5 ); SetColWidth ( 0, GG::X0 ); SetColWidth ( 1, GG::X0 ); SetColWidth ( 2, GG::X0 ); SetColWidth ( 3, GG::X0 ); SetColWidth ( 4, GG::X0 ); LockColWidths(); }
//***************************************************************************** // // Function Name: RGridCtrlBase::SizeCellsToClient( int nNumRows, int nNumCols ) // // Description: Adjusts the cell width and height so that the // number of rows and columns, specified by nNumRows // and nNumCols respectively, will fit into the // client area. // // Returns: None // // Exceptions: None // //***************************************************************************** void RGridCtrlBase::SizeCellsToClient( int nNumRows, int nNumCols ) { ASSERT( GetSafeHwnd() ) ; CRect rect ; GetClientRect( rect ) ; // Set the number of cells per row. SetNumCols( nNumCols ) ; m_fResizeCells = TRUE ; // Reset the cell dimensions // with the new calculations SetCellDimensions( (rect.Width() / nNumCols) - 1, (rect.Height() / nNumRows) - 1 ) ; m_cxVisibleRows = WORD( rect.Height() / m_cxCellHeight ) ; m_cxVisibleCols = WORD( rect.Width() / m_cxCellWidth ) ; UpdateMetrics() ; }
//***************************************************************************** // // Function Name: RGridCtrl::PreSubclassWindow() // // Description: Virtual function override to handle an initialization // that needs to take place before the window is subclassed. // // Returns: None // // Exceptions: None // //***************************************************************************** void RGridCtrlBase::PreSubclassWindow() { SetNumCols( 4 ) ; CWnd::PreSubclassWindow(); }