void OnTechTreeChanged(SideID sideID) { if (sideID == trekClient.GetSideID()) { RebuildList(); } }
void InternetRetrievalDialog::OnUrlsSort( wxListEvent& event ) { sortcol = event.GetColumn(); sortorder = -sortorder; if(sortcol == 0) { #if 0 m_SelectedInternetRetrieval.clear(); for(std::list<FaxUrl*>::iterator it = m_InternetRetrieval.begin(); it != m_InternetRetrieval.end(); it++) { (*it)->Selected = sortorder == 1; if(sortorder == 1) m_SelectedInternetRetrieval.push_back(*it); } RebuildList(); #endif } else if(m_lUrls->GetItemCount() > 500) { wxMessageDialog mdlg(this, _("Sorting this many urls might take too long"), _("weatherfax"), wxOK | wxICON_ERROR); mdlg.ShowModal(); } else m_lUrls->SortItems(SortUrl, (long)m_lUrls); }
ProjectsFileMasksDlg::ProjectsFileMasksDlg(wxWindow* parent, FilesGroupsAndMasks* fgam) : m_FileGroupsAndMasksCopy(*fgam), // store a local copy, so if we press "Cancel", we can revert to the original... m_pFileGroupsAndMasks(fgam), m_LastListSelection(0) { wxXmlResource::Get()->LoadObject(this, parent, _T("dlgProjectsFileMasks"),_T("wxScrollingDialog")); RebuildList(); }
/// @brief DOCME /// @param parent /// @param _local_manager /// DialogAutomation::DialogAutomation(wxWindow *parent, Automation4::ScriptManager *_local_manager) : wxDialog(parent, -1, _("Automation Manager"), wxDefaultPosition, wxDefaultSize) { // Set icon SetIcon(BitmapToIcon(GETIMAGE(automation_toolbutton_24))); local_manager = _local_manager; global_manager = wxGetApp().global_scripts; // create main controls list = new wxListView(this, Automation_List_Box, wxDefaultPosition, wxSize(600, 175), wxLC_REPORT|wxLC_SINGLE_SEL); add_button = new wxButton(this, Automation_Add_Script, _("&Add")); remove_button = new wxButton(this, Automation_Remove_Script, _("&Remove")); reload_button = new wxButton(this, Automation_Reload_Script, _("Re&load")); info_button = new wxButton(this, Automation_Show_Info, _("Show &Info")); reload_autoload_button = new wxButton(this, Automation_Reload_Autoload, _("Re&scan Autoload Dir")); close_button = new wxButton(this, wxID_CANCEL, _("&Close")); // add headers to list view list->InsertColumn(0, _T(""), wxLIST_FORMAT_CENTER, 20); list->InsertColumn(1, _("Name"), wxLIST_FORMAT_LEFT, 140); list->InsertColumn(2, _("Filename"), wxLIST_FORMAT_LEFT, 90); list->InsertColumn(3, _("Description"), wxLIST_FORMAT_LEFT, 330); // button layout wxSizer *button_box = new wxBoxSizer(wxHORIZONTAL); button_box->AddStretchSpacer(2); button_box->Add(add_button, 0); button_box->Add(remove_button, 0); button_box->AddSpacer(10); button_box->Add(reload_button, 0); button_box->Add(info_button, 0); button_box->AddSpacer(10); button_box->Add(reload_autoload_button, 0); button_box->AddSpacer(10); button_box->Add(new HelpButton(this,_T("Automation Manager")), 0); button_box->Add(close_button, 0); button_box->AddStretchSpacer(2); // main layout wxSizer *main_box = new wxBoxSizer(wxVERTICAL); main_box->Add(list, 1, wxEXPAND|wxALL, 5); main_box->Add(button_box, 0, wxEXPAND|(wxALL&~wxTOP), 5); main_box->SetSizeHints(this); SetSizer(main_box); Center(); // why doesn't this work... the button gets the "default" decoration but doesn't answer to Enter // ("esc" does work) SetDefaultItem(close_button); SetAffirmativeId(wxID_CANCEL); close_button->SetDefault(); RebuildList(); UpdateDisplay(); }
cReplayList::cReplayList(cPlayList * List) : cOsdMenu(List->GetName(),20,1,16,5) { displayedCurrIdx=-1; playList=List; RebuildList(); UpdateHelp(); lastModeActivity=time(NULL)-600; lastActivity=time(NULL)-600; hold=false; };
void ProjectsFileMasksDlg::OnDelete(wxCommandEvent& /*event*/) { wxListBox* pList = XRCCTRL(*this, "lstCategories", wxListBox); wxString name = pList->GetStringSelection(); wxString caption; caption.Printf(_("Are you sure you want to delete the group \"%s\"?"), name.c_str()); if (cbMessageBox(caption, _("Confirmation"), wxYES_NO | wxNO_DEFAULT | wxICON_QUESTION, this) == wxID_NO) return; m_FileGroupsAndMasksCopy.DeleteGroup(pList->GetSelection()); RebuildList(); }
void ProjectsFileMasksDlg::OnDelete(wxCommandEvent& event) { wxListBox* pList = XRCCTRL(*this, "lstCategories", wxListBox); wxString name = pList->GetStringSelection(); wxString caption; caption.Printf(_("Are you sure you want to delete the group \"%s\"?"), name.c_str()); wxMessageDialog dlg(this, caption, _("Confirmation"), wxYES_NO | wxNO_DEFAULT | wxCENTRE | wxICON_QUESTION); PlaceWindow(&dlg); if (dlg.ShowModal() == wxID_NO) return; m_FileGroups.DeleteGroup(pList->GetSelection()); RebuildList(); }
void InternetRetrievalDialog::Filter() { if(m_bDisableFilter) return; double lat, lon; if(!m_tContainsLat->GetValue().ToDouble(&lat)) lat = NAN; if(!m_tContainsLon->GetValue().ToDouble(&lon)) lon = NAN; for(std::list<FaxUrl*>::iterator it = m_InternetRetrieval.begin(); it != m_InternetRetrieval.end(); it++) (*it)->Filtered = !(/*(*it)->Area.ContainsLat(lat) && (*it)->Area.ContainsLon(lon) &&*/ HasServer((*it)->Server)); RebuildList(); }
TeleportPane(Modeler* pmodeler) : m_peventDestinations(NULL), m_sortDestination(sortName) { TRef<IObject> pobjColumns; // a team pane is meaningless without a team if (trekClient.MyMission() == NULL) return; // Load the members from MDL TRef<INameSpace> pns = pmodeler->GetNameSpace("teleportpane"); CastTo(m_pbuttonTeleport, pns->FindMember("teleportTeleportButtonPane")); CastTo(m_pbuttonBack, pns->FindMember("teleportBackButtonPane")); CastTo(m_plistPaneDestinations, (Pane*)pns->FindMember("teleportPaneDestinationListPane")); CastTo(pobjColumns, pns->FindMember("teleportPaneDestinationColumns")); CastTo(m_pbuttonbarDestinations, pns->FindMember("teleportPaneDestinationListHeader")); // // Buttons // // mdvalley: Pointers and class names to shut up error C3867 AddEventTarget(&TeleportPane::OnButtonTeleport, m_pbuttonTeleport->GetEventSource()); AddEventTarget(&TeleportPane::OnButtonBack, m_pbuttonBack->GetEventSource()); AddEventTarget(&TeleportPane::OnButtonBar, m_pbuttonbarDestinations->GetEventSource()); // // The Destination list // ParseIntVector(pobjColumns, m_viColumns); m_plistPaneDestinations->SetItemPainter(new DestinationPainter(m_viColumns)); m_peventDestinations = m_plistPaneDestinations->GetSelectionEventSource(); if (m_psinkDestinations) m_peventDestinations->RemoveSink(m_psinkDestinations); m_peventDestinations->AddSink(m_psinkDestinations = new IItemEvent::Delegate(this)); // mdvalley: It's a pointer. AddEventTarget(&TeleportPane::OnButtonTeleport, m_plistPaneDestinations->GetDoubleClickEventSource()); RebuildList(); }
void CFloatingInfoWnd::OnTimer(UINT nIDEvent) { if (nIDEvent == 2) { KillTimer (2); RebuildList (); return; } try { // TDOO: crash here when exit for (int i = 0; i < m_wndList.GetItemCount (); i++) { UpdateDownloadProgress (i); UpdateDownloadSpeed (i); } } catch (...) {} BOOL bFS = fsIsSystemInFullScreenMode (); if (!m_bWasFS != !bFS) { m_bWasFS = bFS; if (bFS && IsWindowVisible () && _App.FloatingWndsHideInFSMode ()) ShowWindow (SW_HIDE); else if (bFS == FALSE && m_bNeedToShow && IsWindowVisible () == FALSE && m_bHideAlways == FALSE) ShowWindow (SW_SHOW); } CFrameWnd::OnTimer(nIDEvent); }
void ProjectsFileMasksDlg::OnSetDefault(wxCommandEvent& event) { m_FileGroups.SetDefault(); RebuildList(); }
void OnDelPlayer(MissionInfo* pMissionInfo, SideID sideID, PlayerInfo* pPlayerInfo, QuitSideReason reason, const char* szMessageParam) { // this might be someone in our list. RebuildList(pPlayerInfo->GetShip()); }
static BOOL CALLBACK DlgProcTypeOptions(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam) { static HANDLE hItemNew, hItemUnknown; switch (msg) { case WM_INITDIALOG: TranslateDialogDefault(hwndDlg); { CLCINFOITEM cii = { 0 }; cii.cbSize = sizeof(cii); cii.flags = CLCIIF_GROUPFONT | CLCIIF_CHECKBOX; cii.pszText = Translate("** New contacts **"); hItemNew = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM) & cii); cii.pszText = Translate("** Unknown contacts **"); hItemUnknown = (HANDLE) SendDlgItemMessage(hwndDlg, IDC_CLIST, CLM_ADDINFOITEM, 0, (LPARAM) & cii); } SetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE, GetWindowLong(GetDlgItem(hwndDlg, IDC_CLIST), GWL_STYLE) | (CLS_SHOWHIDDEN) | (CLS_NOHIDEOFFLINE)); ResetCList(hwndDlg); RebuildList(hwndDlg, hItemNew, hItemUnknown); CheckDlgButton(hwndDlg, IDC_SHOWNOTIFY, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPING, SRMSGDEFSET_SHOWTYPING)); CheckDlgButton(hwndDlg, IDC_TYPEWIN, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, SRMSGDEFSET_SHOWTYPINGWIN)); CheckDlgButton(hwndDlg, IDC_TYPETRAY, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, SRMSGDEFSET_SHOWTYPINGNOWIN)); CheckDlgButton(hwndDlg, IDC_NOTIFYTRAY, DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST)); CheckDlgButton(hwndDlg, IDC_NOTIFYBALLOON, !DBGetContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, SRMSGDEFSET_SHOWTYPINGCLIST)); EnableWindow(GetDlgItem(hwndDlg, IDC_TYPEWIN), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); EnableWindow(GetDlgItem(hwndDlg, IDC_TYPETRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY)); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY)); if (!ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) { EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), FALSE); CheckDlgButton(hwndDlg, IDC_NOTIFYTRAY, BST_CHECKED); SetWindowTextA(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), Translate("Show balloon popup (unsupported system)")); } break; case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_TYPETRAY: if (IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY)) { if (!ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)) { EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), TRUE); } else { EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), TRUE); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), TRUE); } } else { EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), FALSE); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), FALSE); } SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; case IDC_SHOWNOTIFY: EnableWindow(GetDlgItem(hwndDlg, IDC_TYPEWIN), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); EnableWindow(GetDlgItem(hwndDlg, IDC_TYPETRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYTRAY), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); EnableWindow(GetDlgItem(hwndDlg, IDC_NOTIFYBALLOON), IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY) && ServiceExists(MS_CLIST_SYSTRAY_NOTIFY)); //fall-thru case IDC_TYPEWIN: case IDC_NOTIFYTRAY: case IDC_NOTIFYBALLOON: SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; } break; case WM_NOTIFY: switch (((NMHDR *) lParam)->idFrom) { case IDC_CLIST: switch (((NMHDR *) lParam)->code) { case CLN_OPTIONSCHANGED: ResetCList(hwndDlg); break; case CLN_CHECKCHANGED: SendMessage(GetParent(hwndDlg), PSM_CHANGED, 0, 0); break; } break; case 0: switch (((LPNMHDR) lParam)->code) { case PSN_APPLY: { SaveList(hwndDlg, hItemNew, hItemUnknown); DBWriteContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPING, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_SHOWNOTIFY)); DBWriteContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGWIN, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_TYPEWIN)); DBWriteContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGNOWIN, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_TYPETRAY)); DBWriteContactSettingByte(NULL, SRMMMOD, SRMSGSET_SHOWTYPINGCLIST, (BYTE) IsDlgButtonChecked(hwndDlg, IDC_NOTIFYTRAY)); ReloadGlobals(); WindowList_Broadcast(g_dat->hMessageWindowList, DM_OPTIONSAPPLIED, 0, 0); } } break; } break; } return FALSE; }
eOSState cReplayList::ProcessKey(eKeys Key) { int lastCurrent=Current(); eOSState state = cOsdMenu::ProcessKey(Key); // fallback to default mode after some time of inactivity if ( Key!=kNone) lastModeActivity=time(NULL); if ( lastMode !=eMNormal && time(NULL) - lastModeActivity > 40 ) { if (hold) { // break move hold=false; SetItemStr(Get(Current()), playList->GetItemByIndex(Current()), hold); Move(Current(),origPos); playList->GetShuffleIdx()->Move(Current(), origPos); SetCurrent(Get(origPos)); Display(); }; Mode=eMNormal; }; // don't move cursor when it has been moved by the user // a short while ago or in move item mode if ( Key==kUp || Key==kDown || Key==kRight || Key==kLeft ) lastActivity=time(NULL); if (Current() != playList->GetCurrIdx() && time(NULL) - lastActivity > 40 && !hold ) { MENUDEB("SetCurrent current title %d time %d lastActivity %d\n", playList->GetCurrIdx(),int(time(NULL)),int(lastActivity)); SetCurrent(Get(playList->GetCurrIdx())); Display(); }; // handle move item mode if ( lastMode == eMEdit && hold ) { // moves if ( (Key==kUp || Key==kDown|| Key==kRight || Key==kLeft) ) { Move(lastCurrent,Current()); playList->GetShuffleIdx()->Move(lastCurrent,Current()); Display(); }; // end move switch(Key) { case kBack: case kRed: case kGreen: case kYellow: // break Move hold=false; SetItemStr(Get(Current()), playList->GetItemByIndex(Current()), hold); Move(Current(),origPos); playList->GetShuffleIdx()->Move(Current(), origPos); SetCurrent(Get(origPos)); Display(); Key=kNone; state= osContinue; break; case kOk: case kBlue: // finish move hold=false; SetItemStr(Get(Current()), playList->GetItemByIndex(Current()), hold); DisplayCurrent(true); state= osContinue; break; default: break; } }; // handle new items or removed items if ( lastListItemCount != playList->GetNIdx() || playList->IsDirty() ) { Clear(); RebuildList(); Display(); }; if (state != osUnknown ) return state; switch (Key) { case kOk: // skip to current track playList->SetCurrIdx( Current() ); state = PLAY_CURR_FILE; // want to have automatic track change lastActivity=time(NULL)-300; break; case kBack: state= osBack; break; default: break; }; if ( Key >= kRed && Key <= kBlue) state=ProcessColourKeys(Key); if (!HasSubMenu()) UpdateStatus(); if ( Mode != lastMode ) UpdateHelp(); return state; }
/// @brief DOCME /// @param evt /// void DialogAutomation::OnReloadAutoload(wxCommandEvent &evt) { global_manager->Reload(); RebuildList(); UpdateDisplay(); }
void OnDiscoveredStation(IstationIGC* pstation) { // this might be a new station we have built if (pstation->GetSide() == trekClient.GetSide()) RebuildList(); }
void OnModelTerminated(ImodelIGC* pmodel) { // this might a station being destroyed if (pmodel->GetSide() == trekClient.GetSide()) RebuildList(pmodel); }
void OnShipStatusChange(PlayerInfo* pPlayer) { // this might have been someone buying a ship with turrets. RebuildList(); }
void OnStationCaptured(StationID stationID, SideID sideID) { // this might be or have been one of our stations RebuildList(); }
void ProjectsFileMasksDlg::OnSetDefault(wxCommandEvent& /*event*/) { m_FileGroupsAndMasksCopy.SetDefault(); RebuildList(); }
void glictList::SetHeight(float height) { glictPanel::SetHeight(height); RebuildList(); }
void OnAddPlayer(MissionInfo* pMissionInfo, SideID sideID, PlayerInfo* pPlayerInfo) { // this might become someone in our list. RebuildList(); }
//----------------------------------------------------------------------------- //! A new trip has been created, and should be added into the history list [SLOT] //! Method does not preserve focus on currently focused widget in the trip history list //----------------------------------------------------------------------------- void tTripHistoryList::OnRebuildList() { RebuildList(IGNORE_FOCUS); }
//----------------------------------------------------------------------------- //! A new trip has been created, and should be added into the history list [SLOT] //! Method explicitly preserves focus on currently focused widget in trip history list //----------------------------------------------------------------------------- void tTripHistoryList::OnRebuildListAndKeepFocus() { RebuildList(KEEP_FOCUS); }
void yatcStackPanel::StopDraggingChild(const glictPos &eventmousepos) { #if (GLICT_APIREV>=95) glictList::StopDraggingChild(eventmousepos); RebuildList(); #endif }
void glictList::SetWidth(float width) { glictPanel::SetWidth(width); RebuildList(); }