зеркало из https://github.com/mozilla/pjs.git
Port to new AM classes of security button.
This commit is contained in:
Родитель
7ce81d9541
Коммит
6dd1dea18e
|
@ -19,7 +19,7 @@
|
||||||
#include "CBrowserSecurityButton.h"
|
#include "CBrowserSecurityButton.h"
|
||||||
|
|
||||||
CBrowserSecurityButton::CBrowserSecurityButton(LStream* inStream)
|
CBrowserSecurityButton::CBrowserSecurityButton(LStream* inStream)
|
||||||
: CPatternButton(inStream)
|
: CToolbarBevelButton(inStream)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -34,10 +34,13 @@ ResIDT CBrowserSecurityButton::GetIconID(ESecurityState inSecurityState)
|
||||||
void CBrowserSecurityButton::NoteSecurityState(ESecurityState inSecurityState)
|
void CBrowserSecurityButton::NoteSecurityState(ESecurityState inSecurityState)
|
||||||
{
|
{
|
||||||
ResIDT wantedIconID = GetIconID(inSecurityState);
|
ResIDT wantedIconID = GetIconID(inSecurityState);
|
||||||
|
ControlButtonContentInfo currInfo;
|
||||||
|
GetContentInfo ( currInfo );
|
||||||
|
|
||||||
if (wantedIconID != GetGraphicID())
|
if (wantedIconID != currInfo.u.resID)
|
||||||
{
|
{
|
||||||
SetGraphicID(wantedIconID);
|
// set the new icon
|
||||||
Draw(NULL);
|
currInfo.u.resID = wantedIconID;
|
||||||
|
SetContentInfo ( currInfo );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -18,10 +18,10 @@
|
||||||
|
|
||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
#include "CPatternButton.h"
|
#include "CToolbarBevelButton.h"
|
||||||
#include "CSecurityStateListener.h"
|
#include "CSecurityStateListener.h"
|
||||||
|
|
||||||
class CBrowserSecurityButton : public CPatternButton, public CSecurityStateListener
|
class CBrowserSecurityButton : public CToolbarBevelButton, public CSecurityStateListener
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
enum { class_ID = 'BrSB' };
|
enum { class_ID = 'BrSB' };
|
||||||
|
|
|
@ -30,30 +30,4 @@ ResIDT CMiniSecurityButton::GetIconID(ESecurityState inSecurityState)
|
||||||
if (inSecurityState == eSecureState)
|
if (inSecurityState == eSecureState)
|
||||||
result = ResID_SecureIcon;
|
result = ResID_SecureIcon;
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
||||||
// ¥ DrawButtonContent
|
|
||||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
||||||
|
|
||||||
void CMiniSecurityButton::DrawButtonContent(void)
|
|
||||||
{
|
|
||||||
CGrafPtr thePort;
|
|
||||||
::GetPort(&(GrafPtr)thePort);
|
|
||||||
|
|
||||||
Rect theFrame = mCachedButtonFrame;
|
|
||||||
Point theAlignment;
|
|
||||||
|
|
||||||
CalcOrientationPoint(theAlignment);
|
|
||||||
mPatternWorld->Fill(thePort, theFrame, theAlignment);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
||||||
// ¥ DrawButtonGraphic
|
|
||||||
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
|
|
||||||
|
|
||||||
void CMiniSecurityButton::DrawButtonGraphic(void)
|
|
||||||
{
|
|
||||||
CToolbarButton::DrawButtonGraphic();
|
|
||||||
}
|
|
|
@ -36,6 +36,4 @@ class CMiniSecurityButton : public CBrowserSecurityButton
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
virtual void DrawButtonContent(void);
|
|
||||||
virtual void DrawButtonGraphic(void);
|
|
||||||
};
|
};
|
||||||
|
|
Двоичные данные
cmd/macfe/rsrc/navigator/BrowserRat.cnst
Двоичные данные
cmd/macfe/rsrc/navigator/BrowserRat.cnst
Двоичный файл не отображается.
Загрузка…
Ссылка в новой задаче