20#ifndef __kpartmanager_h__
21#define __kpartmanager_h__
27#include <tdelibs_export.h>
36class PartManagerPrivate;
66 enum Reason { ReasonLeftClick = 100, ReasonMidClick, ReasonRightClick, NoReason };
76 PartManager( TQWidget * parent,
const char * name = 0L );
86 PartManager( TQWidget * topLevel, TQObject *parent,
const char *name = 0 );
92 void setSelectionPolicy( SelectionPolicy policy );
96 SelectionPolicy selectionPolicy()
const;
110 void setAllowNestedParts(
bool allow );
114 bool allowNestedParts()
const;
124 void setIgnoreScrollBars(
bool ignore );
128 bool ignoreScrollBars()
const;
135 void setActivationButtonMask(
short int buttonMask );
139 short int activationButtonMask()
const;
144 virtual bool eventFilter( TQObject *obj, TQEvent *ev );
153 virtual void addPart(
Part *part,
bool setActive =
true );
160 virtual void removePart(
Part *part );
167 virtual void replacePart(
Part * oldPart,
Part * newPart,
bool setActive =
true );
177 virtual void setActivePart(
Part *part, TQWidget *widget = 0L );
182 virtual Part *activePart()
const;
187 virtual TQWidget *activeWidget()
const;
197 virtual void setSelectedPart(
Part *part, TQWidget *widget = 0L );
202 virtual Part *selectedPart()
const;
207 virtual TQWidget *selectedWidget()
const;
212 const TQPtrList<Part> *parts()
const;
221 void addManagedTopLevelWidget(
const TQWidget *topLevel );
226 void removeManagedTopLevelWidget(
const TQWidget *topLevel );
269 void slotWidgetDestroyed();
274 void slotManagedTopLevelWidgetDestroyed();
276 Part * findPartFromWidget( TQWidget * widget,
const TQPoint &pos );
277 Part * findPartFromWidget( TQWidget * widget );
280 virtual void virtual_hook(
int id,
void* data );
282 PartManagerPrivate *d;
The part manager is an object which knows about a collection of parts (even nested ones) and handles ...
void setIgnoreScrollBars(bool ignore)
Specifies whether the partmanager should ignore mouse click events for scrollbars or not.
bool ignoreScrollBars() const
void partAdded(KParts::Part *part)
Emitted when a new part has been added.
PartManager(TQWidget *parent, const char *name=0L)
Constructs a part manager.
virtual void setActiveInstance(TDEInstance *instance)
Changes the active instance when the active part changes.
Reason
This extends TQFocusEvent::Reason with the non-focus-event reasons for partmanager to activate a part...
SelectionPolicy
Selection policy. The default policy of a PartManager is Direct.
void setSelectionPolicy(SelectionPolicy policy)
Sets the selection policy of the partmanager.
void activePartChanged(KParts::Part *newPart)
Emitted when the active part has changed.
void slotObjectDestroyed()
Removes a part when it is destroyed.
bool allowNestedParts() const
SelectionPolicy selectionPolicy() const
Returns the current selection policy.
void setAllowNestedParts(bool allow)
Specifies whether the partmanager should handle/allow nested parts or not.
void partRemoved(KParts::Part *part)
Emitted when a part has been removed.