19 #define _TDEPOPUP_H "$Id$"
21 #define INCLUDE_MENUITEM_DEF
23 #include <tqpopupmenu.h>
24 #include <kpixmapeffect.h>
26 #include <tdelibs_export.h>
52 TDEPopupTitle(KPixmapEffect::GradientType gradient,
const TQColor &color,
53 const TQColor &textColor, TQWidget *parent=0,
54 const char *name=0) TDE_DEPRECATED;
60 const TQColor &textColor, TQWidget *parent=0,
61 const char *name=0) TDE_DEPRECATED;
67 void setTitle(
const TQString &text,
const TQPixmap *icon=0);
71 TQString
title()
const {
return titleStr; }
75 TQPixmap
icon()
const {
return miniicon; }
77 TQSize sizeHint()
const;
81 void setText(
const TQString &text );
83 void setIcon(
const TQPixmap &pix );
87 void paintEvent(TQPaintEvent *ev);
90 KPixmapEffect::GradientType grType;
95 TQColor fgColor, bgColor, grHigh, grLow;
99 virtual void virtual_hook(
int id,
void* data );
101 class TDEPopupTitlePrivate;
102 TDEPopupTitlePrivate *d;
140 int insertTitle(
const TQString &text,
int id=-1,
int index=-1);
144 int insertTitle(
const TQPixmap &icon,
const TQString &text,
int id=-1,
150 void changeTitle(
int id,
const TQString &text);
154 void changeTitle(
int id,
const TQPixmap &icon,
const TQString &text);
160 TQString title(
int id=-1)
const;
164 TQPixmap titlePixmap(
int id)
const;
180 void setKeyboardShortcutsEnabled(
bool enable);
187 void setKeyboardShortcutsExecute(
bool enable);
194 TDEPopupMenu(
const TQString &title, TQWidget *parent=0,
const char *name=0) TDE_DEPRECATED;
201 void setTitle(
const TQString &title) TDE_DEPRECATED;
207 TQPopupMenu* contextMenu();
213 const TQPopupMenu* contextMenu()
const;
219 void hideContextMenu();
231 static int contextMenuFocusItem();
237 virtual void activateItemAt(
int index);
243 TQt::ButtonState state()
const;
256 virtual void closeEvent(TQCloseEvent *);
257 virtual void keyPressEvent(TQKeyEvent* e);
259 virtual void mouseReleaseEvent(TQMouseEvent* e);
260 virtual void mousePressEvent(TQMouseEvent* e);
261 virtual bool focusNextPrevChild(
bool next );
262 virtual void contextMenuEvent(TQContextMenuEvent *e);
263 virtual void hideEvent(TQHideEvent*);
265 virtual void virtual_hook(
int id,
void* data );
269 TQString underlineText(
const TQString& text, uint length);
271 void resetKeyboardVars(
bool noMatches =
false);
272 void itemHighlighted(
int whichItem);
273 void showCtxMenu(TQPoint pos);
274 void ctxMenuHiding();
275 void ctxMenuHideShowingMenu();
278 class TDEPopupMenuPrivate;
279 TDEPopupMenuPrivate *d;