virtual Bool CreateLayout(void) { GroupBegin(0, BFH_SCALEFIT | BFV_SCALEFIT, 2, 0, "", BFV_GRIDGROUP_ALLOW_WEIGHTS); AddButton(1000, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog1"); AddButton(1001, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog1"); AddButton(1002, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog1"); AddButton(1003, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog1"); AddEditNumberArrows(1006, BFH_SCALEFIT); AddEditShortcut(1004, BFH_SCALEFIT | BFV_CENTER); BaseContainer fontchooserdata; fontchooserdata.SetBool(FONTCHOOSER_ENABLE_SIZE, true); AddCustomGui(1010, CUSTOMGUI_FONTCHOOSER, String(), BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, fontchooserdata); GroupEnd(); return true; }
virtual Bool CreateLayout(void) { GroupBegin(999, BFH_SCALEFIT | BFV_SCALEFIT, 3, 0, "", BFV_GRIDGROUP_ALLOW_WEIGHTS); AddStaticText(1000, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1001, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1001, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1002, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1003, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1003, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1004, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1005, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddStaticText(1005, BFH_SCALEFIT | BFV_SCALEFIT, 0, 0, "SubDialog2", BORDER_THIN_IN); AddEditNumberArrows(1006, BFH_SCALEFIT); if (!weights_saved) { // set the columns weights.SetInt32(GROUPWEIGHTS_PERCENT_W_CNT, 3); // number of rows - has to be equal to the given layout weights.SetFloat(GROUPWEIGHTS_PERCENT_W_VAL + 0, 1); // weight for col 1 weights.SetFloat(GROUPWEIGHTS_PERCENT_W_VAL + 1, -250); // FIXED weight for col 2 weights.SetFloat(GROUPWEIGHTS_PERCENT_W_VAL + 2, 1); // weight for col 1 // set the rows weights.SetInt32(GROUPWEIGHTS_PERCENT_H_CNT, 4); // number of rows - has to be equal to the given layout weights.SetFloat(GROUPWEIGHTS_PERCENT_H_VAL + 0, -1.0); // weight for row 1 weights.SetFloat(GROUPWEIGHTS_PERCENT_H_VAL + 1, -150.0); // FIXED weight for row 2 weights.SetFloat(GROUPWEIGHTS_PERCENT_H_VAL + 2, 60.0); // weight for row 3 weights.SetFloat(GROUPWEIGHTS_PERCENT_H_VAL + 3, 0.0); // weight for row 4 weights_saved = true; } GroupWeightsLoad(999, weights); GroupEnd(); return true; }
void PaletteSubDialog::PaletteLayout() { if(m_rowArea != NULL){ GetInt32(m_rowArea, m_rows); } if(m_layoutArea != NULL){ GetInt32(m_layoutArea, m_layout); } if(m_labelCheckArea != NULL){ GetBool(m_labelCheckArea,m_showLabel); } if(m_searchText != NULL){ GetString(m_searchText, m_searchString); } if(m_showControls && !m_controlsShown){ LayoutFlushGroup(1); GroupBegin(51, BFV_SCALEFIT, 1, 0, String(), 0); m_nameArea = AddEditText(IDC_NAME, BFH_SCALEFIT); SetString(IDC_NAME, m_palette.m_name); GroupBegin(123,BFH_SCALEFIT,0,1,String(),0); String rowText("Rows"); if(m_layout == 1){ rowText = String("Columns"); } AddStaticText(9, BFH_LEFT, 0, 0, rowText, 0); m_rowArea = AddEditNumberArrows(IDC_ROWS, BFH_RIGHT); GroupEnd(); SetInt32(m_rowArea, m_rows,1,99); m_layoutArea = AddComboBox(IDC_LAYOUT_DIRECTION,BFH_LEFT); AddChild(m_layoutArea, 0, String("Horizontal")); AddChild(m_layoutArea, 1, String("Vertical")); SetInt32(m_layoutArea, m_layout); m_labelCheckArea = AddCheckbox(IDC_LABELCHECKBOX,BFH_LEFT,0,0,String("Show Labels")); SetBool(m_labelCheckArea, m_showLabel); AddStaticText(IDC_FILTERLABEL, BFH_CENTER, 0, 0, String("Filter:"), 0); m_searchText = AddEditText(IDC_SEARCHTEXT, BFH_SCALEFIT); SetString(m_searchText, m_searchString); m_controlsShown = TRUE; GroupBegin(142,BFV_SCALEFIT,1,0,String(),0); GroupBorderNoTitle(BORDER_THIN_IN); AddButton(IDC_CREATEMATERIAL, BFH_CENTER, 0, 0, String("Create Materials")); m_linkColor = AddCheckbox(IDC_LINKMATERIALS,BFH_LEFT,0,0,String("Link colors")); GroupEnd(); AddButton(IDC_HIDE, BFH_CENTER, 0, 0, String("Hide Controls")); GroupEnd(); GroupBegin(3,BFV_SCALEFIT,1,0,String(),0); m_actionPopup = AddPopupButton(3,BFH_LEFT); m_trashArea = AddUserArea(4, BFH_CENTER); AttachUserArea(m_trash, m_trashArea); GroupEnd(); LayoutChanged(1); } if(!m_showControls && m_controlsShown){ LayoutFlushGroup(1); GroupBegin(3,BFV_SCALEFIT,1,0,String(),0); m_actionPopup = AddPopupButton(3,BFH_LEFT); m_trashArea = AddUserArea(4, BFH_CENTER); AttachUserArea(m_trash, m_trashArea); GroupEnd(); LayoutChanged(1); m_rowArea = NULL; m_layoutArea = NULL; m_labelCheckArea = NULL; m_searchText = NULL; m_controlsShown = FALSE; } LayoutFlushGroup(6); LayoutPalette(); LayoutChanged(6); }