Added a constructor from SPaneInfo and SViewInfo instead of an LStream; factored behavior from constructors into |common_initialization()|

This commit is contained in:
scc%netscape.com 1998-09-01 18:42:52 +00:00
Родитель e3ab7e45e7
Коммит 0a7a44060e
2 изменённых файлов: 42 добавлений и 16 удалений

Просмотреть файл

@ -34,23 +34,44 @@
// ムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムム
CDragBar::CDragBar(LStream* inStream)
: LView(inStream)
{
mPatternWorld = CSharedPatternWorld::CreateSharedPatternWorld(10000);
ThrowIfNULL_(mPatternWorld);
mPatternWorld->AddUser(this);
inStream->ReadPString(mTitle);
*inStream >> mIsDocked;
: LView(inStream)
{
inStream->ReadPString(mTitle);
*inStream >> mIsDocked;
::SetEmptyRgn(mDockedMask);
mIsTracking = false;
// The visible flag will be off or latent at this point. If it's invisible in the
// resource, we want to mark it as fully hidden (ie, not docked either)
mIsAvailable = (mVisible != triState_Off);
SetRefreshAllWhenResized(false);
}
common_initialization();
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
CDragBar::CDragBar( const SPaneInfo& inPaneInfo, const SViewInfo& inViewInfo, bool inDocked )
: LView(inPaneInfo, inViewInfo),
mIsDocked(inDocked)
{
common_initialization();
}
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
// ¥
// ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
void
CDragBar::common_initialization()
{
mPatternWorld = CSharedPatternWorld::CreateSharedPatternWorld(10000);
ThrowIfNULL_(mPatternWorld);
mPatternWorld->AddUser(this);
::SetEmptyRgn(mDockedMask);
mIsTracking = false;
// The visible flag will be off or latent at this point. If it's invisible in the
// resource, we want to mark it as fully hidden (ie, not docked either)
mIsAvailable = (mVisible != triState_Off);
SetRefreshAllWhenResized(false);
}
// ムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムムム
// ・

Просмотреть файл

@ -40,6 +40,7 @@ class CDragBar :
enum { class_ID = 'DgBr' };
CDragBar(LStream* inStream);
CDragBar(const SPaneInfo&, const SViewInfo&, bool inDocked);
virtual ~CDragBar();
virtual void Dock(void);
@ -58,6 +59,10 @@ class CDragBar :
virtual void SetAvailable(Boolean inAvailable); // for javascript
virtual Boolean IsAvailable(); // for javascript
private:
void common_initialization();
protected:
virtual void DrawSelf(void);