Beispiel #1
0
/*
===============
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();
	}
}
Beispiel #2
0
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(&notifyData, 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;
}
Beispiel #4
0
LRESULT 
CToolWindow::OnPaint(UINT /*uMsg*/, WPARAM /*wParam*/, LPARAM lParam, BOOL& bHandled)
{
	UpdateIcon();
	bHandled = FALSE;
	return S_OK;
}
Beispiel #5
0
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();
}
Beispiel #6
0
void CTrayFlash::OnTimerRefresh(tDWORD nTimerSpin)
{
	if( GUI_TIMERSPIN_INTERVAL(800) )
		UpdateIcon();

	TBase::OnTimerRefresh(nTimerSpin);
}
Beispiel #7
0
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));
}
Beispiel #8
0
/**
 * 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();
	}
}
Beispiel #9
0
void StateButton::FireModelUpdate(int prop)
{
	if (prop == ClickRegion::Props::ENABLED) {
		UpdateIcon();
	}

	SUPER::FireModelUpdate(prop);
}
Beispiel #10
0
int __cdecl CSrmmProxyWindow::OnDbSettingChanged(WPARAM wParam, LPARAM lParam)
{
	if ((HANDLE)wParam == m_hContact)
	{
		UpdateIcon();
		Refresh();
	}
	return 0;
}
Beispiel #11
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());
}
Beispiel #12
0
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());
}
Beispiel #13
0
void CTaskDialog::SetIcon(LPCTSTR icon)
{
	if (!::IsWindow(GetSafeHwnd())) {
		CSimpleTaskDialog::SetIcon(icon);
		return ;
	}

	UpdateIcon(TDIE_ICON_MAIN, icon);
}
Beispiel #14
0
void
CConnectionManager::Disconnect()
{
	TRACE_I(_T("Trying to disconnect ..."));
	if (!m_Connection.IsOpen()) return;
	SendBye();
	m_Connection.StopComm();
	UpdateIcon();
}
Beispiel #15
0
int __cdecl CSrmmProxyWindow::OnContactTyping(WPARAM wParam, LPARAM lParam)
{
	if ((HANDLE)wParam == m_hContact)
	{
		m_bTyping = lParam ? true : false;
		UpdateIcon();
	}
	return 0;
}
Beispiel #16
0
void CSrmmProxyWindow::OnTabActive()
{
	m_bActive = true;
	if (m_bUnread)
	{
		g_clistProxyWnd->RemoveOverlayEvent(g_eventSlotMessage);
		m_bUnread = false;
		UpdateIcon();
	}
}
Beispiel #17
0
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());
}
Beispiel #18
0
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);
}
Beispiel #19
0
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);
}
Beispiel #20
0
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);
}
Beispiel #21
0
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();
	}
}
Beispiel #23
0
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();
}
Beispiel #24
0
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();
}
Beispiel #25
0
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;
   }
}
Beispiel #26
0
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;
}
Beispiel #27
0
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);
}
Beispiel #28
0
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();
}
Beispiel #29
0
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;
}
Beispiel #30
0
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;
}