void wxSTEditorNotebook::UpdateAllItems() { UpdateItems(GetOptions().GetEditorPopupMenu(), GetOptions().GetMenuBar(), GetOptions().GetToolBar()); UpdateItems(GetOptions().GetNotebookPopupMenu()); UpdateItems(GetOptions().GetSplitterPopupMenu()); }
void ModEditWindow::JarModListCtrl::PasteMod() { wxFileDataObject data; // Get data from the clipboard. if (wxTheClipboard->Open()) { if (wxTheClipboard->IsSupported(wxDF_FILENAME)) { wxTheClipboard->GetData(data); } else { wxTheClipboard->Close(); return; } wxTheClipboard->Close(); } // Determine where to insert the files. int insertPoint = m_inst->GetModList()->size(); if (GetSelectedItems().Count() > 0) insertPoint = GetSelectedItems()[0]; // Add the given mods. wxArrayString filenames = data.GetFilenames(); for (wxArrayString::iterator iter = filenames.begin(); iter != filenames.end(); ++iter) { m_inst->GetModList()->InsertMod(insertPoint, *iter); } UpdateItems(); }
void wxListBox::OnInternalIdle() { if ( m_updateScrollbarY || m_updateScrollbarX ) { UpdateScrollbars(); m_updateScrollbarX = m_updateScrollbarY = false; } if ( m_currentChanged ) { DoEnsureVisible(m_current); m_currentChanged = false; } if ( m_updateCount ) { UpdateItems(); m_updateCount = 0; } wxListBoxBase::OnInternalIdle(); }
void ModEditWindow::MLModListCtrl::DeleteMod() { if (GetItemCount() <= 0) return; wxArrayInt indices; long item = -1; while (true) { item = GetNextItem(item, wxLIST_NEXT_ALL, wxLIST_STATE_SELECTED); if (item == -1) break; indices.Add(item); } //FIXME: this looks like lazy code. it can be done better. for (int i = indices.GetCount() -1; i >= 0; i--) { m_inst->GetMLModList()->DeleteMod(indices[i]); } auto mllist = m_inst->GetMLModList(); mllist->UpdateModList(); UpdateItems(); }
void ModEditWindow::CoreModListCtrl::PasteMod() { wxFileDataObject data; // Get data from the clipboard. if (wxTheClipboard->Open()) { if (wxTheClipboard->IsSupported(wxDF_FILENAME)) { wxTheClipboard->GetData(data); } else { wxTheClipboard->Close(); return; } wxTheClipboard->Close(); } // Add the given mods. wxArrayString filenames = data.GetFilenames(); CopyFiles(filenames,m_inst->GetCoreModsDir().GetFullPath()); //FIXME: this looks like lazy code. it can be done better. auto mllist = m_inst->GetCoreModList(); mllist->UpdateModList(); UpdateItems(); }
void ModEditWindow::MLModListCtrl::PasteMod() { wxFileDataObject data; // Get data from the clipboard. if (wxTheClipboard->Open()) { if (wxTheClipboard->IsSupported(wxDF_FILENAME)) { wxTheClipboard->GetData(data); } else { wxTheClipboard->Close(); return; } wxTheClipboard->Close(); } // Add the given mods. wxArrayString filenames = data.GetFilenames(); for (wxArrayString::iterator iter = filenames.begin(); iter != filenames.end(); ++iter) { wxFileName file(*iter); wxCopyFile(file.GetFullPath(), Path::Combine(m_inst->GetMLModsDir(), file.GetFullName())); } //FIXME: this looks like lazy code. it can be done better. auto mllist = m_inst->GetMLModList(); mllist->UpdateModList(); UpdateItems(); }
LRESULT PreviewLogDlg::OnInitDialog(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM /*lParam*/, BOOL& /*bHandled*/) { GetDlgItem(IDC_PRV_DLG_SERVER_GROUP).SetWindowText(CTSTRING(PRV_DLG_SERVER_GROUP)); GetDlgItem(IDC_PRV_DLG_SERVER_STATE_STATIC).SetWindowText(CTSTRING(PRV_DLG_SERVER_STATE_STATIC)); GetDlgItem(IDC_PRV_DLG_VIDEO_NAME_STATIC).SetWindowText(CTSTRING(PRV_DLG_VIDEO_NAME_STATIC)); GetDlgItem(IDC_PRV_DLG_LOG_GROUP).SetWindowText(CTSTRING(PRV_DLG_LOG_GROUP)); CenterWindow(GetParent()); GetDlgItem(IDCANCEL).SetWindowText(CTSTRING(CLOSE)); SetWindowText(CTSTRING(PREVIEW_LOG_DLG)); UpdateItems(); // Fill IDC_PRV_DLG_LOG_LST CListBox mBox; mBox.Attach(GetDlgItem(IDC_PRV_DLG_LOG_LST)); string outString; while (VideoPreview::getInstance()->GetNextLogItem(outString)) mBox.AddString(Text::toT(outString).c_str()); mBox.Detach(); VideoPreview::getInstance()->SetLogDlgWnd(*this); return FALSE; }
void page_main::LoadSettings(int){ emit HasPendingChanges(false); emit ChangePageTitle( tr("Desktop Settings") ); INFO.clear(); INFO = KnownPages(); UpdateItems(""); ui->lineEdit->setFocus(); }
BOOL CFuncDialog::OnInitDialog() { CDialog::OnInitDialog(); UpdateModuleName(); UpdateItems(); return TRUE; // return TRUE unless you set the focus to a control // EXCEPTION: OCX Property Pages should return FALSE }
ECode WifiTile::WifiDetailAdapter::OnAccessPointsChanged( /* [in] */ ArrayOf<INetworkControllerAccessPoint*>* accessPoints) { mAccessPoints = accessPoints; UpdateItems(); if (accessPoints != NULL && accessPoints->GetLength() > 0) { mHost->FireScanStateChanged(FALSE); } return NOERROR; }
void wxSTEditorNotebook::OnRightUp(wxMouseEvent &event) { wxMenu* popupMenu = GetOptions().GetNotebookPopupMenu(); if (popupMenu) { UpdateItems(popupMenu); PopupMenu(popupMenu, event.GetPosition()); } else event.Skip(); }
LRESULT PreviewLogDlg::onStartStop(WORD /*wNotifyCode*/, WORD wID, HWND /*hWndCtl*/, BOOL& /*bHandled*/) { if (VideoPreview::getInstance()->IsServerStarted()) VideoPreview::getInstance()->StopServer(); else VideoPreview::getInstance()->StartServer(); UpdateItems(); return 0; }
int TmpPanel::GetFindData(PluginPanelItem **pPanelItem,size_t *pItemsNumber,const OPERATION_MODES OpMode) { IfOptCommonPanel(); size_t Size=Info.PanelControl(this,FCTL_GETCOLUMNTYPES,0,NULL); wchar_t* ColumnTypes=new wchar_t[Size]; Info.PanelControl(this,FCTL_GETCOLUMNTYPES,static_cast<int>(Size),ColumnTypes); UpdateItems(IsOwnersDisplayed(ColumnTypes),IsLinksDisplayed(ColumnTypes)); delete[] ColumnTypes; *pPanelItem=TmpPanelItem; *pItemsNumber=TmpItemsNumber; return(TRUE); }
void ModEditWindow::JarModListCtrl::DeleteMod() { if (GetItemCount() <= 0) return; wxArrayInt indices = GetSelectedItems(); for (int i = indices.GetCount() -1; i >= 0; i--) { m_inst->GetModList()->DeleteMod(indices[i]); } UpdateItems(); }
void Inventory::RemoveItem(HudItem* pItem, bool updateLayout) { // Remove item from player. mPlayer->RemoveItem(pItem); // Send message to server. SendItemRemoved(mPlayer->GetId(), pItem->GetName(), pItem->GetLevel()); // Clear the inventory and update it with the players current items. if(updateLayout) UpdateItems(); // Tell the shop. mShop->InventoryItemRemoved(pItem); }
void SkillInventory::RemoveItem(HudItem* pItem, bool updateLayout) { // Sell item. mPlayer->RemoveSkill(pItem->GetName()); // Send message to server. SendItemRemoved(mPlayer->GetPlayer()->GetId(), pItem->GetName(), pItem->GetLevel()); // Free all slots and get the current skills from the player. if(updateLayout) UpdateItems(); // Tell the shop that an item was sold. mShop->InventoryItemRemoved(pItem); }
void BrowseTileListBox::RemoveSelected() { if(GetItemCount() == 0 || GetSelectedCount() == 0) return; Clear(); items.clear(); // Delete the items from the tile ItemVector tile_selection = edit_tile->popSelectedItems(); for(ItemVector::iterator iit = tile_selection.begin(); iit != tile_selection.end(); ++iit) { delete *iit; } edit_tile->select(); UpdateItems(); Refresh(); }
LRESULT PreviewLogDlg::onReceiveLogItem(UINT /*wNotifyCode*/, WPARAM wID, LPARAM /*hWndCtl*/, BOOL& /*bHandled*/) { CListBox mBox; mBox.Attach(GetDlgItem(IDC_PRV_DLG_LOG_LST)); string outString; if (VideoPreview::getInstance()->GetNextLogItem(outString)) mBox.AddString(Text::toT(outString).c_str()); mBox.SetTopIndex(mBox.GetCount() - 1); mBox.Detach(); UpdateItems(); // Make Scroll return 0; }
void Inventory::AddItem(HudItem* pItem) { // Any free slots? if(!HasFreeSlots()) return; // Remove previous level item. if(pItem->GetLevel() > 1) RemoveItem(GetItemLoader()->GetItem(ItemKey(pItem->GetName(), pItem->GetLevel()-1))); // Add item to player. mPlayer->AddItem(pItem); // Send message to server. SendItemAdded(mPlayer->GetId(), pItem->GetName(), pItem->GetLevel()); // Clear the inventory and update it with the players current items. UpdateItems(); }
void SkillInventory::AddItem(HudItem* pItem) { // Any free slots? if(!HasFreeSlots()) return; Skill* skill = mPlayer->AddSkill(pItem->GetName()); // Pass on the attributes. // [NOTE] REALLY UGLY [HACK][WARNING]. skill->SetAttributes(pItem->GetAttributes()); skill->SetDescription(pItem->GetDescription()); skill->SetCost(pItem->GetCost()); skill->SetLevel(pItem->GetLevel()); // Send message to server. SendItemAdded(mPlayer->GetPlayer()->GetId(), pItem->GetName(), pItem->GetLevel()); UpdateItems(); }
ECode WifiTile::WifiDetailAdapter::CreateDetailView( /* [in] */ IContext* context, /* [in] */ IView* convertView, /* [in] */ IViewGroup* parent, /* [out] */ IView** view) { VALIDATE_NOT_NULL(view); if (DEBUG) Logger::D(mHost->TAG, "createDetailView convertView=%d", (convertView != NULL)); mAccessPoints = NULL; mHost->mController->ScanForAccessPoints(); mHost->FireScanStateChanged(TRUE); mItems = CQSDetailItems::ConvertOrInflate(context, convertView, parent); mItems->SetTagSuffix(String("Wifi")); mItems->SetCallback(this); mItems->SetEmptyState(R::drawable::ic_qs_wifi_detail_empty, R::string::quick_settings_wifi_detail_empty_text); UpdateItems(); SetItemsVisible(((QSTile::SignalState*)mHost->mState.Get())->mEnabled); *view = IView::Probe(mItems); REFCOUNT_ADD(*view); return NOERROR; }
int TmpPanel::ProcessEvent(intptr_t Event,void *) { if (Event==FE_CHANGEVIEWMODE) { IfOptCommonPanel(); size_t Size=Info.PanelControl(this,FCTL_GETCOLUMNTYPES,0,NULL); wchar_t* ColumnTypes=new wchar_t[Size]; Info.PanelControl(this,FCTL_GETCOLUMNTYPES,static_cast<int>(Size),ColumnTypes); int UpdateOwners=IsOwnersDisplayed(ColumnTypes) && !LastOwnersRead; int UpdateLinks=IsLinksDisplayed(ColumnTypes) && !LastLinksRead; delete[] ColumnTypes; if (UpdateOwners || UpdateLinks) { UpdateItems(UpdateOwners,UpdateLinks); Info.PanelControl(this,FCTL_UPDATEPANEL,TRUE,NULL); Info.PanelControl(this,FCTL_REDRAWPANEL,0,NULL); } } return(FALSE); }
void wxSTEditorFrame::OnSTEPopupMenu(wxSTEditorEvent &event) { event.Skip(); wxSTEditor *editor = event.GetEditor(); UpdateItems(editor->GetOptions().GetEditorPopupMenu()); }
int Session::UpdateConfigurations(UpdateProxy<Configuration>* proxy, string configId) { return UpdateItems("configurations", proxy, configId); }
int Session::UpdateEntities(UpdateProxy<UserEntity>* proxy, string configId) { return UpdateItems("entities", proxy, configId); }
int Session::UpdateQueries(UpdateProxy<Query>* proxy, string configId) { return UpdateItems("queries", proxy, configId); }
int Session::UpdateSentimentPhrases(UpdateProxy<SentimentPhrase>* proxy, string configId) { return UpdateItems("sentiment", proxy, configId); }
ChangeIconDialog::InstIconListCtrl::InstIconListCtrl(wxWindow *parent) : wxListCtrl(parent, -1, wxDefaultPosition, wxDefaultSize, wxLC_LIST | wxLC_SINGLE_SEL) { UpdateItems(); }
BrowseTileListBox::BrowseTileListBox(wxWindow* parent, wxWindowID id, Tile* tile) : wxVListBox(parent, id, wxDefaultPosition, wxSize(200, 180), wxLB_MULTIPLE), edit_tile(tile) { edit_tile->select(); UpdateItems(); }
void SkillInventory::SetPlayer(PlayerModule* pPlayer) { mPlayer = pPlayer; UpdateItems(); }