28 #ifndef _KMDI_CHILD_FRM_H_ 29 #define _KMDI_CHILD_FRM_H_ 31 #include <tqptrlist.h> 33 #include <tqpushbutton.h> 35 #include <tqdatetime.h> 40 #include "kmdichildfrmcaption.h" 57 virtual void mousePressEvent( TQMouseEvent* );
74 KMdiChildFrmMoveEvent( TQMoveEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User +
int( KMdi::EV_Move ) ), e ) {}
86 KMdiChildFrmDragBeginEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User +
int( KMdi::EV_DragBegin ) ), e ) {}
97 KMdiChildFrmDragEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User +
int( KMdi::EV_DragEnd ) ), e ) {}
119 KMdiChildFrmResizeEndEvent( TQMouseEvent *e ) : TQCustomEvent( TQEvent::Type( TQEvent::User +
int( KMdi::EV_ResizeEnd ) ), e ) {}
123 class KMdiChildFrmPrivate;
139 enum MdiWindowState { Normal, Maximized, Minimized };
147 TQToolButton* m_pUnixIcon;
148 TQToolButton* m_pMinimize;
149 TQToolButton* m_pMaximize;
150 TQToolButton* m_pClose;
151 TQToolButton* m_pUndock;
152 MdiWindowState m_state;
153 TQRect m_restoredRect;
155 int m_iLastCursorCorner;
158 TQPixmap* m_pIconButtonPixmap;
159 TQPixmap* m_pMinButtonPixmap;
160 TQPixmap* m_pMaxButtonPixmap;
161 TQPixmap* m_pRestoreButtonPixmap;
162 TQPixmap* m_pCloseButtonPixmap;
163 TQPixmap* m_pUndockButtonPixmap;
175 TQSize m_oldClientMinSize;
176 TQSize m_oldClientMaxSize;
177 TQLayout::ResizeMode m_oldLayoutResizeMode;
178 TQTime m_timeMeasure;
199 void setClient(
KMdiChildView *w,
bool bAutomaticResize =
false );
205 void unsetClient( TQPoint positionOffset = TQPoint( 0, 0 ) );
210 void setIcon(
const TQPixmap &pxm );
215 TQPixmap* icon()
const;
220 void enableClose(
bool bEnable );
235 void setState( MdiWindowState state,
bool bAnimate =
true );
240 inline MdiWindowState
state()
const {
return m_state; }
245 TQRect mdiAreaContentsRect()
const;
250 TQRect restoreGeometry()
const;
255 void setRestoreGeometry(
const TQRect& newRestGeo );
266 TQPopupMenu* systemMenu()
const;
276 void redecorateButtons();
292 void raiseAndActivate();
299 virtual void setMinimumSize (
int minw,
int minh );
303 void slot_resizeViaSystemMenu();
312 virtual void resizeEvent( TQResizeEvent * );
339 virtual void moveEvent( TQMoveEvent* me );
344 virtual void leaveEvent( TQEvent * );
352 virtual bool eventFilter( TQObject*, TQEvent* );
358 void resizeWindow(
int resizeCorner,
int x,
int y );
363 void setResizeCursor(
int resizeCorner );
368 void unsetResizeCursor();
374 virtual void switchToMinimizeLayout();
385 void doResize(
bool captionOnly );
392 void maximizePressed();
397 void restorePressed();
402 void minimizePressed();
412 void undockPressed();
417 void showSystemMenu();
425 void linkChildren( TQDict<TQ_FocusPolicy>* pFocPolDict );
431 TQDict<TQ_FocusPolicy>* unlinkChildren();
438 int getResizeCorner(
int ax,
int ay );
441 KMdiChildFrmPrivate *d;
444 #endif //_KMDICHILDFRM_H_ void updateRects()
Forces updating the rects of the caption and so...
int m_windowMenuID
Every child frame window has an temporary ID in the Window menu of the child area.
TQPopupMenu * m_pSystemMenu
Imitates a system menu for child frame windows.
void setCaption(const TQString &text)
Repaint with a new caption bar title.
MdiWindowState state() const
Returns the current state of the window.
virtual void mouseReleaseEvent(TQMouseEvent *)
Restore the normal mouse cursor, set the state variable back to 'not moving'.
a TQCustomEvent for begin of resizing This special event will be useful, to inform view about child f...
int captionHeight() const
Returns the caption bar height.
a TQCustomEvent for end of resizing This special event will be useful, to inform view about child fra...
TQString m_szCaption
the title string shown in the caption bar
const TQString & caption()
Gets the caption of this mdi child.
virtual void mouseMoveEvent(TQMouseEvent *e)
Checks if out of move range of the KMdiChildArea and calls KMdiChildFrm::move.
bool isInDrag() const
returns the mouse state "In Drag"
a TQCustomEvent for begin of dragging This special event will be useful, to inform view about child f...
bool isInResize() const
returns the mouse state "In Resize"
a TQCustomEvent for move This special event will be useful, to inform view about child frame event...
virtual void mousePressEvent(TQMouseEvent *)
The same as KMdiChildFrmCaption::slot_moveViaSystemMenu.
a TQCustomEvent for end of dragging This special event will be useful, to inform view about child fra...
Base class for all your special view windows.