/*********************************************************************\ Function name : CDialogRadioBtn::CreateElementBegin Description : Created at : 15.08.01, @ 16:37:32 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogRadioBtn::CreateElementBegin(Int32 lID, GeDialog *pDlg) { if (m_bText) pDlg->AddRadioText(lID,m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH), m_strName); else pDlg->AddRadioButton(lID,m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH), m_strName); }
/*********************************************************************\ Function name : CDialogCustomElement::CreateElementBegin Description : Created at : 27.03.02, @ 11:22:38 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogCustomElement::CreateElementBegin(Int32 lID, GeDialog *pDlg) { if (!m_pbcGUI) return; if (g_pCustomElements && m_lElement >= 0 && m_lElement < g_pCustomElements->Entries()) { CCustomElements* pElement = g_pCustomElements->GetItem(m_lElement); if (pElement) { BaseContainer bc = m_pbcGUI[m_lElement]; for (Int32 i = 0; pElement->m_pProp && pElement->m_pProp[i].type != CUSTOMTYPE_END; i++) { if (pElement->m_pProp[i].type == CUSTOMTYPE_STRING) { String str = m_pbcGUI[m_lElement].GetString(pElement->m_pProp[i].id); if (str.Content()) { Bool b; String str1 = m_pDocument->GetString(str, b); if (!b) str1 = "[" + str + "]"; bc.SetString(pElement->m_pProp[i].id, str1); } } } pDlg->AddCustomGui(lID, pElement->m_lID, m_strName, m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH), bc); //BaseCustomGuiLib* pGUI = (BaseCustomGuiLib*)pDlg->FindCustomGui(lID, pElement->m_lID); //if (pGUI) pGUI->SetDefaultForResEdit(); } } }
/*********************************************************************\ Function name : CDialogArrowBtn::CreateElementBegin Description : Created at : 12.08.01, @ 21:53:03 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogArrowBtn::CreateElementBegin(Int32 lID, GeDialog *pDlg) { if (m_bIsPopupButton) { pDlg->AddPopupButton(lID, m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH)); String strID, strStringID; Bool bFound; for (Int32 a = 0; a < m_Children.GetItemCount(); a++) { m_Children.GetElement(a, strID, strStringID); pDlg->AddChild(lID, a, m_pDocument->GetString(strStringID, bFound)); } } else pDlg->AddArrowButton(lID, m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH), m_lArrowType); }
/*********************************************************************\ Function name : CDialogGroup::CreateElementBegin Description : Created at : 12.08.01, @ 09:17:47 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogGroup::CreateElementBegin(Int32 lID, GeDialog *pDlg) { if (m_lGroupType == 0) pDlg->GroupBegin(lID, m_lFlags, m_lCols, m_lRows, m_strName, m_lGroupFlags | (m_bHasTitleCheckbox ? BFV_BORDERGROUP_CHECKBOX : 0)); else if (m_lGroupType == 1) pDlg->TabGroupBegin(lID, m_lFlags, m_lTabType); else if (m_lGroupType == 2) pDlg->ScrollGroupBegin(lID, m_lFlags, m_lScrollType, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH)); else if (m_lGroupType == 3) pDlg->AddRadioGroup(lID, m_lFlags, m_lCols, m_lRows); if (m_bHasBorder && (m_lGroupType != 1) && m_lBorderStyle != BORDER_NONE) // tab groups don't have a border { if (!m_strName.Content() || m_bBorderNoTitle || m_lGroupType) // scroll groups don't have a name pDlg->GroupBorderNoTitle(m_lBorderStyle); else pDlg->GroupBorder(m_lBorderStyle); } pDlg->GroupBorderSpace(m_lLeftBorder, m_lTopBorder, m_lRightBorder, m_lBottomBorder); if (m_lSpaceX >= 0 && m_lSpaceY >= 0) pDlg->GroupSpace(m_lSpaceX, m_lSpaceY); if (m_lLastChildID >= 0) pDlg->SetInt32(lID, m_lLastChildID); }
/*********************************************************************\ Function name : CDialogUserArea::CreateElementBegin Description : Created at : 15.08.01, @ 19:47:00 Created by : Thomas Kunert Modified by : \*********************************************************************/ void CDialogUserArea::CreateElementBegin(Int32 lID, GeDialog *pDlg) { pDlg->AddUserArea(lID, m_lFlags, CONVERT_WIDTH(m_lInitW), CONVERT_HEIGHT(m_lInitH)); pDlg->AttachUserArea(m_wndUser, lID, USERAREA_0); Float chr; Int32 w = CONVERT_WIDTH(m_lInitW); Int32 h = CONVERT_WIDTH(m_lInitH); chr = GetChr(w) / 10.0; m_wndUser.m_lMinSizeX = GetPix(w) + Int32(m_wndUser.DrawGetTextWidth("8") * chr + 0.5); chr = GetChr(h) / 10.0; m_wndUser.m_lMinSizeY = GetPix(h) + Int32(m_wndUser.DrawGetFontHeight() * chr + 0.5); m_wndUser.m_pParent = pDlg; m_wndUser.m_lID = lID; }