CLocalTreeView::CLocalTreeView(wxWindow* parent, wxWindowID id, CState *pState, CQueueView *pQueueView) : wxTreeCtrlEx(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxTR_EDIT_LABELS | wxTR_LINES_AT_ROOT | wxTR_HAS_BUTTONS | wxNO_BORDER), CSystemImageList(16), CStateEventHandler(pState), m_pQueueView(pQueueView) { wxGetApp().AddStartupProfileRecord(_T("CLocalTreeView::CLocalTreeView")); #ifdef __WXMAC__ SetFont(wxSystemSettings::GetFont(wxSYS_DEFAULT_GUI_FONT)); #endif pState->RegisterHandler(this, STATECHANGE_LOCAL_DIR); pState->RegisterHandler(this, STATECHANGE_APPLYFILTER); SetImageList(GetSystemImageList()); #ifdef __WXMSW__ m_pVolumeEnumeratorThread = 0; CreateRoot(); #else wxTreeItemId root = AddRoot(_T("/")); SetItemImage(root, GetIconIndex(dir), wxTreeItemIcon_Normal); SetItemImage(root, GetIconIndex(opened_dir), wxTreeItemIcon_Selected); SetItemImage(root, GetIconIndex(dir), wxTreeItemIcon_Expanded); SetItemImage(root, GetIconIndex(opened_dir), wxTreeItemIcon_SelectedExpanded); SetDir(_T("/")); #endif SetDropTarget(new CLocalTreeViewDropTarget(this)); }
XML::XML(MAUtil::String filename) { MAUtil::String file = getLocalPath()+filename; file += ".xml"; fname = file; XML::file = maFileOpen(file.c_str(), MA_ACCESS_READ_WRITE); int res = maFileExists(XML::file); if(res == 1) { maFileTruncate(XML::file, 0); } else if(res == 0) { maFileCreate(XML::file); } else { maPanic(0, "Error on file creation."); } CreateRoot(filename); _ActivityIndicator = new WaitMessage("Please, wait...", "Saving data to file."); }
BOOL Cdlg_tracker::OnInitDialog() { ETSLayoutDialog::OnInitDialog(); CreateRoot(VERTICAL) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_TRACKER_STATIC, NORESIZE) << item(IDC_TRACKER, ABSOLUTE_VERT) ) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_USER_STATIC, NORESIZE) << item(IDC_USER, ABSOLUTE_VERT) ) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_PASS_STATIC, NORESIZE) << item(IDC_PASS, ABSOLUTE_VERT) ) << (pane(HORIZONTAL, ABSOLUTE_VERT) << itemGrowing(HORIZONTAL) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ) ; UpdateLayout(); return true; }
BOOL Cdlg_profiles::OnInitDialog() { ETSLayoutDialog::OnInitDialog(); update_controls(); CreateRoot(VERTICAL) << item(IDC_LIST) << (pane(HORIZONTAL, ABSOLUTE_VERT) << itemGrowing(HORIZONTAL) << item(IDC_ACTIVATE, NORESIZE) << item(IDC_INSERT, NORESIZE) << item(IDC_EDIT, NORESIZE) << item(IDC_DELETE, NORESIZE) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ) ; UpdateLayout(); m_list.InsertColumn(0, "Name"); m_list.InsertColumn(1, "Seeding Ratio", LVCFMT_RIGHT); m_list.InsertColumn(2, "Upload Rate", LVCFMT_RIGHT); m_list.InsertColumn(3, "Upload Slots", LVCFMT_RIGHT); m_list.InsertColumn(4, "Peer Limit", LVCFMT_RIGHT); m_list.InsertColumn(5, "Torrent Limit", LVCFMT_RIGHT); m_list.InsertColumn(6, ""); for (t_entries::const_iterator i = m_entries.begin(); i != m_entries.end(); i++) m_list.InsertItemData(i->first); m_list.auto_size(); return true; }
SegmentsTreeGPU::SegmentsTreeGPU(ScanData* data) { countLayer = 0; root = 0; step = 50; maxValue = 32000; CreateRoot(data); }
bool FbXmlHandler::startElement(const QString & namespaceURI, const QString & localName, const QString &qName, const QXmlAttributes &attributes) { Q_UNUSED(namespaceURI); Q_UNUSED(localName); const QString name = qName.toLower(); if (m_handler) return m_handler->doStart(name, attributes); m_handler = CreateRoot(name, attributes); return m_handler; }
const char* csXmlReadDocument::ParseInPlace (char* buf, size_t bufSize, bool collapse) { CreateRoot (buf, bufSize); root->SetCondenseWhiteSpace(collapse); root->Parse (root->input_data); if (root->Error ()) return root->ErrorDesc (); return 0; }
XMLElement XMLFile::GetOrCreateRoot(const String& name) { XMLElement root = GetRoot(name); if (root.NotNull()) return root; root = GetRoot(); if (root.NotNull()) URHO3D_LOGWARNING("XMLFile already has root " + root.GetName() + ", deleting it and creating root " + name); return CreateRoot(name); }
BOOL CXSTE_edit_dlg::OnInitDialog() { CreateRoot(VERTICAL) << item(IDC_NAME, ABSOLUTE_VERT) << item(IDC_VALUE, GREEDY) << item(IDC_EXTRA_VALUE, ABSOLUTE_VERT) << (pane(HORIZONTAL, ABSOLUTE_VERT) << itemGrowing(HORIZONTAL) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ); ETSLayoutDialog::OnInitDialog(); return true; }
HRESULT CPipeline::Create() { PreviewEngine = NULL; //fTime= 0; CreateRoot(); ReadWriteMutex = CreateMutexA(NULL, FALSE, "DXCCPipeline_SceneReadWriteLock"); InitializeCriticalSection(&ZeroSceneReadersSection); SceneReadersCount = 0; ZeroSceneReadersEvent = CreateEventA(NULL, TRUE, TRUE, "DXCCPipeline_ZeroReaders"); return S_OK; }
bool CSpaceTree::constructTree(CTriContainer *pTriContainer_) { if(pTriContainer_->getCountTries()<1) { return false; } m_pTriContainer = pTriContainer_; m_pNodeRoot = allocNewNode( 0 ); reserveNodeTableEstimate( m_vecNodeTable, m_pTriContainer ); CreateRoot( m_vecNodeTable, m_pNodeRoot, pTriContainer_->m_vecTris ); BuildupTree_recurse( m_vecNodeTable, m_pNodeRoot, pTriContainer_->m_vecTris, LIMITTRISPERNODE, 0 ); return true; }
BOOL Cdlg_login::OnInitDialog() { ETSLayoutDialog::OnInitDialog(); CreateRoot(VERTICAL) << (pane(HORIZONTAL, ABSOLUTE_VERT) << (pane(VERTICAL, GREEDY) << item(IDC_GAME, GREEDY) << item(IDC_USER, GREEDY) ) << (pane(VERTICAL, GREEDY) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ) ) << item(IDC_EDIT, GREEDY) ; UpdateLayout(); xcc_dirs::load_from_registry(); add_game("Software\\Westwood\\Emperor", game_ebfd, 0x1f); add_game("Software\\Westwood\\Nox", game_nox, 0x25); add_game("Software\\Westwood\\Tiberian Sun", game_ts, 0x12); add_game("Software\\Westwood\\Tiberian Sun", game_ts_fs, 0x1c); add_game("Software\\Westwood\\Red Alert 2", game_ra2, 0x21); add_game("Software\\Westwood\\Renegade", game_rg, 0xc); add_game("Software\\Westwood\\Yuri's Revenge", game_ra2_yr, 0x29); for (int i = 1; i < 26; i++) { t_nick e; Creg_key key; if (ERROR_SUCCESS == key.open(HKEY_CLASSES_ROOT, string("Wchat\\Nick" + n(i) + "\\Nick"), KEY_READ) && ERROR_SUCCESS == key.query_value("", e.name) && ERROR_SUCCESS == key.open(HKEY_CLASSES_ROOT, string("Wchat\\Nick" + n(i) + "\\Pass"), KEY_READ) && ERROR_SUCCESS == key.query_value("", e.password) && !e.name.empty() && e.password.length() == 8) { m_user.SetItemData(m_user.AddString(e.name.c_str()), m_nicks.size()); m_nicks.push_back(e); } } if (m_nicks.empty()) { m_user.SetItemData(m_user.AddString(""), m_nicks.size()); m_nicks.push_back(t_nick()); } m_game.SetCurSel(0); m_user.SetCurSel(0); return true; }
BOOL CSearchStringDlg::OnInitDialog() { CreateRoot(VERTICAL) << item(IDC_NAME, ABSOLUTE_VERT) << item(IDC_LIST, GREEDY) << (pane(HORIZONTAL, ABSOLUTE_VERT) << itemGrowing(HORIZONTAL) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ); ETSLayoutDialog::OnInitDialog(); m_list.InsertColumn(0, "Name"); m_list.InsertColumn(1, "Value"); m_list.auto_size(); return true; }
BOOL CUpgradeDlg::OnInitDialog() { CDialog::OnInitDialog(); // TODO: Add extra initialization here CreateRoot(VERTICAL) << item(IDC_STATIC1,NORESIZE) << item (IDC_EDDATE) << ( pane(HORIZONTAL, ABSOLUTE_VERT ) << itemGrowing (HORIZONTAL) << item( IDOK, NORESIZE) << item( IDCANCEL, NORESIZE ) ); UpdateLayout(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
/** Attempts to load the UI from file. Returns false if it failed. If any elements exist before loading they will be deleted first. */ bool UserInterface::Load(String fromFile) { std::cout<<"\nLoading UI from file "<<fromFile<<"..."; if (root) delete root; /// Create the root node. CreateRoot(); name = fromFile; /// Load into root. bool success = LoadFromFile(fromFile, root); if (success){ source = fromFile; std::cout<<" done."; } else std::cout<<" failed."; return success; }
BOOL Cdlg_make_torrent::OnInitDialog() { m_tracker = AfxGetApp()->GetProfileString(m_strRegStore, "tracker"); m_trackers = AfxGetApp()->GetProfileString(m_strRegStore, "trackers"); m_use_merkle = AfxGetApp()->GetProfileInt(m_strRegStore, "use_merkle", false); ETSLayoutDialog::OnInitDialog(); CreateRoot(VERTICAL) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_NAME_STATIC, NORESIZE) << item(IDC_NAME, GREEDY) ) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_TRACKER_STATIC, NORESIZE) << item(IDC_TRACKER, GREEDY) ) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_TRACKERS_STATIC, NORESIZE) << item(IDC_TRACKERS, GREEDY) ) << item(IDC_LIST, GREEDY) << (pane(HORIZONTAL, ABSOLUTE_VERT) << item(IDC_SEED_AFTER_MAKING, NORESIZE) << item(IDC_USE_MERKLE, NORESIZE) << itemGrowing(HORIZONTAL) << item(IDC_LOAD_TRACKERS, NORESIZE) << item(IDC_SAVE, NORESIZE) ) ; UpdateLayout(); m_list.InsertColumn(0, "Name"); m_list.InsertColumn(1, "Size", LVCFMT_RIGHT); m_list.InsertColumn(2, ""); m_sort_column = 0; m_sort_reverse = false; for (t_map::const_iterator i = m_map.begin(); i != m_map.end(); i++) m_list.InsertItemData(i->first); post_insert(); return true; }
CLocalTreeView::CLocalTreeView(wxWindow* parent, wxWindowID id, CState *pState, CQueueView *pQueueView) : wxTreeCtrl(parent, id, wxDefaultPosition, wxDefaultSize, wxTAB_TRAVERSAL | wxTR_EDIT_LABELS | wxTR_LINES_AT_ROOT | wxTR_HAS_BUTTONS | wxNO_BORDER), CSystemImageList(16), CStateEventHandler(pState, STATECHANGE_LOCAL_DIR | STATECHANGE_APPLYFILTER), m_pQueueView(pQueueView) { m_setSelection = false; SetImageList(GetSystemImageList()); #ifdef __WXMSW__ m_pVolumeEnumeratorThread = 0; CreateRoot(); #else AddRoot(_T("/"), GetIconIndex(dir), GetIconIndex(opened_dir)); SetDir(_T("/")); #endif SetDropTarget(new CLocalTreeViewDropTarget(this)); }
BOOL Cdlg_peer_connect::OnInitDialog() { ETSLayoutDialog::OnInitDialog(); CreateRoot(VERTICAL) << (pane(HORIZONTAL) << (pane(VERTICAL) << item(IDC_HOST_STATIC, NORESIZE) << item(IDC_PORT_STATIC, NORESIZE) ) << (pane(VERTICAL) << item(IDC_HOST, ABSOLUTE_VERT) << item(IDC_PORT, ABSOLUTE_VERT) ) ) << (pane(HORIZONTAL) << itemGrowing(HORIZONTAL) << item(IDOK, NORESIZE) << item(IDCANCEL, NORESIZE) ) ; UpdateLayout(); return true; }