/* =============== idPlayerIcon::Draw =============== */ void idPlayerIcon::Draw( idPlayer *player, const idVec3 &origin ) { idPlayer *localPlayer = gameLocal.GetLocalPlayer(); if ( !localPlayer || !localPlayer->GetRenderView() ) { FreeIcon(); return; } idMat3 axis = localPlayer->GetRenderView()->viewaxis; if ( player->isLagged && !player->spectating ) { // create the icon if necessary, or update if already created if ( !CreateIcon( player, ICON_LAG, origin, axis ) ) { UpdateIcon( player, origin, axis ); } } else if ( player->isChatting && !player->spectating ) { if ( !CreateIcon( player, ICON_CHAT, origin, axis ) ) { UpdateIcon( player, origin, axis ); } #ifdef CTF } else if ( g_CTFArrows.GetBool() && gameLocal.mpGame.IsGametypeFlagBased() && gameLocal.GetLocalPlayer() && player->team == gameLocal.GetLocalPlayer()->team && !player->IsHidden() && !player->AI_DEAD ) { int icon = ICON_TEAM_RED + player->team; if ( icon != ICON_TEAM_RED && icon != ICON_TEAM_BLUE ) return; if ( !CreateIcon( player, ( playerIconType_t )icon, origin, axis ) ) { UpdateIcon( player, origin, axis ); } #endif } else { FreeIcon(); } }
CSrmmProxyWindow::CSrmmProxyWindow(HANDLE hContact, HWND hwndWindow, HWND hwndParent) { m_hContact = hContact; m_hwndWindow = hwndWindow; m_hwndParent = hwndParent; m_hbmpPreview = NULL; m_refreshPreview = true; m_bActive = false; m_bUnread = false; m_bTyping = false; UpdateIcon(); SetWindowText(hwnd(), (TCHAR *)CallService(MS_CLIST_GETCONTACTDISPLAYNAME, (WPARAM)m_hContact, GCDNF_TCHAR)); SetTimer(1, 1000); SetEventHook(ME_DB_EVENT_ADDED, &CSrmmProxyWindow::OnDbEventAdded); SetEventHook(ME_DB_CONTACT_SETTINGCHANGED, &CSrmmProxyWindow::OnDbSettingChanged); SetEventHook(ME_AV_AVATARCHANGED, &CSrmmProxyWindow::OnAvatarChanged); SetEventHook(ME_PROTO_CONTACTISTYPING, &CSrmmProxyWindow::OnContactTyping); AddButton(LoadSkinnedIcon(SKINICON_OTHER_USERDETAILS), TranslateT("User Details"), 1, THBF_DISMISSONCLICK); AddButton(LoadSkinnedIcon(SKINICON_OTHER_HISTORY), TranslateT("History"), 2, THBF_DISMISSONCLICK); AddButton(LoadSkinnedIcon(SKINICON_EVENT_FILE), TranslateT("File"), 3, THBF_DISMISSONCLICK); UpdateButtons(g_pTaskbarList); }
bool wxTaskBarIconEx::SetBalloon(const wxIcon& icon, const wxString title, const wxString message, unsigned int timeout, unsigned int iconballoon) { if (!IsOK()) return false; if (!icon.Ok()) return false; memset(¬ifyData, 0, sizeof(notifyData)); notifyData.cbSize = sizeof(notifyData); notifyData.hWnd = (HWND) m_hWnd; notifyData.uID = 99; notifyData.uCallbackMessage = sm_taskbarMsg; notifyData.uFlags = NIF_MESSAGE | NIF_INFO | NIF_TIP | NIF_ICON; notifyData.dwInfoFlags = iconballoon | NIIF_NOSOUND; notifyData.uTimeout = timeout; notifyData.uVersion = NOTIFYICON_VERSION; lstrcpyn(notifyData.szInfo, WXSTRINGCAST message, sizeof(notifyData.szInfo)); lstrcpyn(notifyData.szInfoTitle, WXSTRINGCAST title, sizeof(notifyData.szInfoTitle)); lstrcpyn(notifyData.szTip, WXSTRINGCAST wxEmptyString, sizeof(notifyData.szTip)); notifyData.hIcon = (HICON) icon.GetHICON(); UpdateIcon(); return m_iconAdded; }
LRESULT CToolWindow::OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& bHandled) { UpdateIcon(); bHandled = FALSE; return S_OK; }
void CTray::OnTimerRefresh(tDWORD nTimerSpin) { tDWORD nCurTick = nTimerSpin % (AVS_QUERYING_INTERVAL/TIMER_REFRESH_INT); if( m_bEnableTrayIconAnimation && m_pAVSProfile ) { if( cAVSStatistics * pStat = (cAVSStatistics *)m_pAVSProfile->statistics(NULL, cAVSStatistics::eIID) ) { if( !nCurTick ) { // time to get AVS load and change states m_pAVSProfile->UpdateStatistics(); CStructData data (pStat); Item()->UpdateData(true, &data); if( !pStat->m_nPerformance ) pStat->m_nObjectOrigin = OBJECT_ORIGIN_UNKNOWN; else if( pStat->m_nPerformance < 20 ) pStat->m_nPerformance = 20; else if( pStat->m_nPerformance > 90 ) pStat->m_nPerformance = 90; m_nTicksActiveState = (tDWORD)(((pStat->m_nPerformance/100.) * (AVS_QUERYING_INTERVAL/TIMER_REFRESH_INT))); } else if( nCurTick >= m_nTicksActiveState ) pStat->m_nObjectOrigin = OBJECT_ORIGIN_UNKNOWN; } } m_fUpdateActive = nCurTick < 9; UpdateIcon(); }
void CTrayFlash::OnTimerRefresh(tDWORD nTimerSpin) { if( GUI_TIMERSPIN_INTERVAL(800) ) UpdateIcon(); TBase::OnTimerRefresh(nTimerSpin); }
void BPose::DeselectWithoutErasingBackground(BRect, BPoseView* poseView) { ASSERT(poseView->ViewMode() != kListMode); ASSERT(!IsSelected()); BPoint location(Location(poseView)); // draw icon directly if (fPercent == -1) DrawIcon(location, poseView, poseView->IconSize(), true); else UpdateIcon(location, poseView); BColumn* column = poseView->FirstColumn(); if (column == NULL) return; BTextWidget* widget = WidgetFor(column->AttrHash()); if (widget == NULL || !widget->IsVisible()) return; // just invalidate the background, don't draw anything poseView->Invalidate(widget->CalcRect(location, 0, poseView)); }
/** * Set the button state. * @param checked @c true for checked, @c false for unchecked. */ void StateButton::SetChecked(bool checked) { if (this->checked != checked) { this->checked = checked; FireModelUpdate(Props::CHECKED); UpdateIcon(); } }
void StateButton::FireModelUpdate(int prop) { if (prop == ClickRegion::Props::ENABLED) { UpdateIcon(); } SUPER::FireModelUpdate(prop); }
int __cdecl CSrmmProxyWindow::OnDbSettingChanged(WPARAM wParam, LPARAM lParam) { if ((HANDLE)wParam == m_hContact) { UpdateIcon(); Refresh(); } return 0; }
void pgDomain::Validate(frmMain *form) { wxString sql = wxT("ALTER DOMAIN ") + GetQuotedFullIdentifier() + wxT("\n VALIDATE CONSTRAINT ") + GetCheckConstraintName(); GetDatabase()->ExecuteVoid(sql); iSetValid(true); UpdateIcon(form->GetBrowser()); }
void pgForeignKey::Validate(frmMain *form) { wxString sql = wxT("ALTER TABLE ") + GetQuotedSchemaPrefix(fkSchema) + qtIdent(fkTable) + wxT("\n VALIDATE CONSTRAINT ") + GetQuotedIdentifier(); GetDatabase()->ExecuteVoid(sql); iSetValid(true); UpdateIcon(form->GetBrowser()); }
void CTaskDialog::SetIcon(LPCTSTR icon) { if (!::IsWindow(GetSafeHwnd())) { CSimpleTaskDialog::SetIcon(icon); return ; } UpdateIcon(TDIE_ICON_MAIN, icon); }
void CConnectionManager::Disconnect() { TRACE_I(_T("Trying to disconnect ...")); if (!m_Connection.IsOpen()) return; SendBye(); m_Connection.StopComm(); UpdateIcon(); }
int __cdecl CSrmmProxyWindow::OnContactTyping(WPARAM wParam, LPARAM lParam) { if ((HANDLE)wParam == m_hContact) { m_bTyping = lParam ? true : false; UpdateIcon(); } return 0; }
void CSrmmProxyWindow::OnTabActive() { m_bActive = true; if (m_bUnread) { g_clistProxyWnd->RemoveOverlayEvent(g_eventSlotMessage); m_bUnread = false; UpdateIcon(); } }
void pgCheck::Validate(frmMain *form) { wxString sql = wxT("ALTER ") + objectKind + wxT(" ") + GetQuotedSchemaPrefix(objectSchema) + qtIdent(objectName) + wxT("\n VALIDATE CONSTRAINT ") + GetQuotedIdentifier(); GetDatabase()->ExecuteVoid(sql); iSetValid(true); UpdateIcon(form->GetBrowser()); }
void CTaskDialog::SetFooterIcon(HICON hIcon) { if (!::IsWindow(GetSafeHwnd())) { m_config.dwFlags |= TDF_USE_HICON_FOOTER; m_config.hFooterIcon = hIcon; return ; } UpdateIcon(TDIE_ICON_FOOTER, hIcon); }
void CTaskDialog::SetFooterIcon(LPCTSTR icon) { if (!::IsWindow(GetSafeHwnd())) { m_config.dwFlags &= ~TDF_USE_HICON_FOOTER; m_config.pszFooterIcon = icon; return ; } UpdateIcon(TDIE_ICON_FOOTER, icon); }
void CTaskDialog::SetIcon(HICON hIcon) { if (!::IsWindow(GetSafeHwnd())) { m_config.dwFlags |= TDF_USE_HICON_MAIN; m_config.hMainIcon = hIcon; return ; } UpdateIcon(TDIE_ICON_MAIN, hIcon); }
void BPose::UpdateBrokenSymLink(BPoint poseLoc, BPoseView* poseView) { ASSERT(TargetModel()->IsSymLink()); ASSERT(!TargetModel()->LinkTo()); if (!TargetModel()->IsSymLink() || TargetModel()->LinkTo()) return; UpdateIcon(poseLoc, poseView); }
/* =============== idPlayerIcon::Draw =============== */ void idPlayerIcon::Draw( idPlayer *player, const idVec3 &origin ) { idPlayer *localPlayer = gameLocal.GetLocalPlayer(); if( !localPlayer || !localPlayer->GetRenderView() ) { FreeIcon(); return; } idMat3 axis = localPlayer->GetRenderView()->viewaxis; if( player->isLagged ) { // create the icon if necessary, or update if already created if( !CreateIcon( player, ICON_LAG, origin, axis ) ) { UpdateIcon( player, origin, axis ); } } else if( player->isChatting ) { if( !CreateIcon( player, ICON_CHAT, origin, axis ) ) { UpdateIcon( player, origin, axis ); } } else { FreeIcon(); } }
void BPose::UpdateWasBrokenSymlink(BPoint poseLoc, BPoseView* poseView) { if (!fModel->IsSymLink()) return; if (fModel->LinkTo()) { BEntry entry(fModel->EntryRef(), true); if (entry.InitCheck() != B_OK) { watch_node(fModel->LinkTo()->NodeRef(), B_STOP_WATCHING, poseView); fModel->SetLinkTo(NULL); UpdateIcon(poseLoc, poseView); } return; } poseView->CreateSymlinkPoseTarget(fModel); UpdateIcon(poseLoc, poseView); if (fModel->LinkTo()) fModel->LinkTo()->CloseNode(); }
void CIconSelectDialog::OnBrowseDefault(UINT uNotifyCode, int nID, HWND hWndCtl) { TCHAR ResourcePath[_MAX_PATH+1]; FILL_ZERO(ResourcePath); GetModuleFileName(GetModuleHandle(NULL), ResourcePath, _MAX_PATH); //本体のパス取得 //EXEのパスを元にDLLのファイル名を組み立てる PathRemoveFileSpec(ResourcePath); PathAppend(ResourcePath,CString(MAKEINTRESOURCE(IDS_ICON_FILE_NAME_DEFAULT))); IconPath=ResourcePath; DoDataExchange(FALSE); UpdateIcon(); }
int main(int argc, char* argv[]) { if (argc == 3) { if (UpdateIcon(argv[1], argv[2])) return 0; else return -1; } else { fprintf(stderr, "Usage: edicon.exe <exefile> <icofile>\n"); return -1; } }
LRESULT CIconSelectDialog::OnInitDialog(HWND hWnd, LPARAM lParam) { ASSERT(AssocInfo); CenterWindow(); ListView=GetDlgItem(IDC_LIST_ICON); //DDX情報アップデート DoDataExchange(FALSE); UpdateIcon(); ListView.SetItemState(AssocInfo->IconIndex,LVIS_SELECTED,1); // ダイアログリサイズ初期化 DlgResize_Init(true, true, WS_THICKFRAME | WS_CLIPCHILDREN); return TRUE; }
void pgTrigger::SetEnabled(ctlTree *browser, const bool b) { if (GetQuotedFullTable().Len() > 0 && ((enabled && !b) || (!enabled && b))) { wxString sql = wxT("ALTER TABLE ") + GetQuotedFullTable() + wxT(" "); if (enabled && !b) sql += wxT("DISABLE"); else if (!enabled && b) sql += wxT("ENABLE"); sql += wxT(" TRIGGER ") + GetQuotedIdentifier(); GetDatabase()->ExecuteVoid(sql); } enabled = b; UpdateIcon(browser); }
void NewInstanceDialog::OnName ( wxCommandEvent& event ) { if(!m_loadingDone) return; if(m_textName->IsEmptyUnfocused()) { m_btnOK->Enable(false); m_name = wxEmptyString; UpdateIcon(); return; } m_name = m_textName->GetValue(); m_name.Strip(wxString::both); wxString folderName; if(fsutils::GetValidInstanceFolderName(m_name,folderName)) { m_btnOK->Enable(true); } else { m_btnOK->Enable(false); } UpdateIcon(); }
NS_IMETHODIMP TaskbarTabPreview::SetIcon(imgIContainer *icon) { HICON hIcon = NULL; if (icon) { nsresult rv; rv = nsWindowGfx::CreateIcon(icon, PR_FALSE, 0, 0, &hIcon); NS_ENSURE_SUCCESS(rv, rv); } if (mIcon) ::DestroyIcon(mIcon); mIcon = hIcon; mIconImage = icon; return mVisible ? UpdateIcon() : NS_OK; }
NS_IMETHODIMP TaskbarTabPreview::SetIcon(imgIContainer *icon) { HICON hIcon = nullptr; if (icon) { nsresult rv; rv = nsWindowGfx::CreateIcon(icon, false, 0, 0, nsWindowGfx::GetIconMetrics(nsWindowGfx::kSmallIcon), &hIcon); NS_ENSURE_SUCCESS(rv, rv); } if (mIcon) ::DestroyIcon(mIcon); mIcon = hIcon; mIconImage = icon; return mVisible ? UpdateIcon() : NS_OK; }