зеркало из https://github.com/mozilla/gecko-dev.git
make the toolbar inherit from the dataModelWidget class like the trees.
This commit is contained in:
Родитель
4ad7e18ed5
Коммит
cbea612556
|
@ -88,7 +88,7 @@ static CNavTokenDeallocator gItemInfoKiller;*/
|
|||
//--------------------------------------------------------------------
|
||||
//-- nsToolbar Constructor
|
||||
//--------------------------------------------------------------------
|
||||
nsToolbar::nsToolbar() : ChildWindow(), nsIToolbar()
|
||||
nsToolbar::nsToolbar() : nsDataModelWidget(), nsIToolbar()
|
||||
{
|
||||
NS_INIT_REFCNT();
|
||||
|
||||
|
@ -820,6 +820,14 @@ nsEventStatus nsToolbar::HandleEvent(nsGUIEvent *aEvent)
|
|||
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
void nsToolbar::HandleDataModelEvent(int anEvent, nsHierarchicalDataItem* pItem)
|
||||
{
|
||||
Invalidate(PR_FALSE);
|
||||
}
|
||||
|
||||
|
||||
//-------------------------------------------------------------------
|
||||
NS_METHOD nsToolbar::SetWrapping(PRBool aDoWrap)
|
||||
{
|
||||
|
|
|
@ -23,11 +23,13 @@
|
|||
#include "nsWindow.h"
|
||||
#include "nsIImageButton.h"
|
||||
#include "nsIToolbarItem.h"
|
||||
#include "nsDataModelWidget.h"
|
||||
|
||||
|
||||
class ToolbarLayoutInfo;
|
||||
|
||||
//------------------------------------------------------------
|
||||
class nsToolbar : public ChildWindow,
|
||||
class nsToolbar : public nsDataModelWidget,
|
||||
public nsIToolbar,
|
||||
public nsIToolbarItem
|
||||
|
||||
|
@ -62,7 +64,7 @@ public:
|
|||
NS_IMETHOD_(nsEventStatus) HandleEvent(nsGUIEvent *aEvent);
|
||||
NS_IMETHOD_(nsEventStatus) OnPaint(nsIRenderingContext& aRenderingContext,
|
||||
const nsRect& aDirtyRect);
|
||||
|
||||
NS_IMETHOD_(void) HandleDataModelEvent(int event, nsHierarchicalDataItem* pItem) ;
|
||||
|
||||
// nsIToolbarItem
|
||||
NS_IMETHOD Repaint(PRBool aIsSynchronous);
|
||||
|
|
Загрузка…
Ссылка в новой задаче