Exploited better syntax for class constants; delay hooking up HT_FEData until creating the HT_Pane to hook it up to; fixed formatting

This commit is contained in:
scc%netscape.com 1998-10-05 22:41:32 +00:00
Родитель 3f3172f86b
Коммит fcec3df6d1
2 изменённых файлов: 27 добавлений и 35 удалений

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

@ -20,46 +20,41 @@
#include "CRDFToolbar.h" #include "CRDFToolbar.h"
const ClassIDT CRDFToolbarContainer::class_ID;
CRDFToolbarContainer::CRDFToolbarContainer( LStream* inStream ) CRDFToolbarContainer::CRDFToolbarContainer( LStream* inStream )
: CDragBarContainer(inStream), : CDragBarContainer(inStream)
// _ht_root( HT_NewToolbarPane(CreateNotificationStruct()) )
_ht_root( NULL )
{ {
/*
We don't want to actually create the toolbar |HT_Pane| until everything else exists,
i.e., after we've done everything needed in |FinishCreateSelf()|.
*/
}
void
CRDFToolbarContainer::FinishCreateSelf()
{
CDragBarContainer::FinishCreateSelf();
// Everything we need to create the |HT_Pane| now exists...
_ht_root = auto_ptr<_HT_PaneStruct>(HT_NewToolbarPane(CreateNotificationStruct()));
HT_SetPaneFEData(_ht_root.get(), this); HT_SetPaneFEData(_ht_root.get(), this);
} }
void void
CRDFToolbarContainer :: FinishCreateSelf ( ) CRDFToolbarContainer::BuildToolbarsPresentAtStartup()
{ {
CDragBarContainer::FinishCreateSelf(); }
// defer creation of the toolbar pane until everything is created because
// we need to have the dock around when we pull in the toolbars
_ht_root = auto_ptr<_HT_PaneStruct>(HT_NewToolbarPane(CreateNotificationStruct()));
} // FinishCreateSelf
//
// BuildToolbarsPresentAtStartup
//
// Nothing for now.
void
CRDFToolbarContainer :: BuildToolbarsPresentAtStartup ( )
{
} // BuildToolbarsPresentAtStartup
void void
CRDFToolbarContainer :: RestorePlace(LStream *inPlace) CRDFToolbarContainer::RestorePlace( LStream *inPlace )
{ {
}
} // RestorePlace
void void

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

@ -41,10 +41,7 @@ class CRDFToolbarContainer
{ {
public: public:
enum static const ClassIDT class_ID = 'RTCt';
{
class_ID = 'RTCt'
};
CRDFToolbarContainer( LStream* ); CRDFToolbarContainer( LStream* );
// virtual ~CRDFToolbarContainer(); -- already virtual from bases, |auto_ptr| member means no destructor needed // virtual ~CRDFToolbarContainer(); -- already virtual from bases, |auto_ptr| member means no destructor needed
@ -59,8 +56,8 @@ class CRDFToolbarContainer
virtual void HandleNotification( HT_Notification, HT_Resource, HT_Event, void*, uint32 ); virtual void HandleNotification( HT_Notification, HT_Resource, HT_Event, void*, uint32 );
// overriding the appropriate methods of |CDragBarContainer| // overriding the appropriate methods of |CDragBarContainer|
virtual void BuildToolbarsPresentAtStartup ( ) ; virtual void BuildToolbarsPresentAtStartup() ;
virtual void RestorePlace(LStream *inPlace); virtual void RestorePlace( LStream* );
virtual void FinishCreateSelf(); virtual void FinishCreateSelf();
private: private: