• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • tdemdi
 

tdemdi

Public Types | Public Slots | Public Member Functions | Public Attributes | Protected Slots | Protected Member Functions | Protected Attributes | Friends | List of all members
KMdiChildFrm Class Reference

#include <tdemdichildfrm.h>

Inherits TQFrame.

Public Types

enum  MdiWindowState { Normal , Maximized , Minimized }
 

Public Slots

void slot_resizeViaSystemMenu ()
 

Public Member Functions

 KMdiChildFrm (KMdiChildArea *parent)
 
 ~KMdiChildFrm ()
 
void setClient (KMdiChildView *w, bool bAutomaticResize=false)
 
void unsetClient (TQPoint positionOffset=TQPoint(0, 0))
 
void setIcon (const TQPixmap &pxm)
 
TQPixmap * icon () const
 
void enableClose (bool bEnable)
 
void setCaption (const TQString &text)
 
const TQString & caption ()
 
void setState (MdiWindowState state, bool bAnimate=true)
 
MdiWindowState state () const
 
TQRect mdiAreaContentsRect () const
 
TQRect restoreGeometry () const
 
void setRestoreGeometry (const TQRect &newRestGeo)
 
void updateRects ()
 
TQPopupMenu * systemMenu () const
 
int captionHeight () const
 
void redecorateButtons ()
 
bool isInDrag () const
 
bool isInResize () const
 
void raiseAndActivate ()
 
virtual void setMinimumSize (int minw, int minh)
 

Public Attributes

KMdiChildView * m_pClient
 

Protected Slots

void maximizePressed ()
 
void restorePressed ()
 
void minimizePressed ()
 
void closePressed ()
 
void undockPressed ()
 
void showSystemMenu ()
 

Protected Member Functions

virtual void resizeEvent (TQResizeEvent *)
 
virtual void mouseMoveEvent (TQMouseEvent *e)
 
virtual void mousePressEvent (TQMouseEvent *e)
 
virtual void mouseReleaseEvent (TQMouseEvent *)
 
virtual void moveEvent (TQMoveEvent *me)
 
virtual void leaveEvent (TQEvent *)
 
virtual bool eventFilter (TQObject *, TQEvent *)
 
void resizeWindow (int resizeCorner, int x, int y)
 
void setResizeCursor (int resizeCorner)
 
void unsetResizeCursor ()
 
virtual void switchToMinimizeLayout ()
 
void doResize ()
 
void doResize (bool captionOnly)
 
void linkChildren (TQDict< TQWidget::FocusPolicy > *pFocPolDict)
 
TQDict< TQWidget::FocusPolicy > * unlinkChildren ()
 
int getResizeCorner (int ax, int ay)
 

Protected Attributes

KMdiChildArea * m_pManager
 
KMdiChildFrmCaption * m_pCaption
 
KMdiWin32IconButton * m_pWinIcon
 
TQToolButton * m_pUnixIcon
 
TQToolButton * m_pMinimize
 
TQToolButton * m_pMaximize
 
TQToolButton * m_pClose
 
TQToolButton * m_pUndock
 
MdiWindowState m_state
 
TQRect m_restoredRect
 
int m_iResizeCorner
 
int m_iLastCursorCorner
 
bool m_bResizing
 
bool m_bDragging
 
TQPixmap * m_pIconButtonPixmap
 
TQPixmap * m_pMinButtonPixmap
 
TQPixmap * m_pMaxButtonPixmap
 
TQPixmap * m_pRestoreButtonPixmap
 
TQPixmap * m_pCloseButtonPixmap
 
TQPixmap * m_pUndockButtonPixmap
 
int m_windowMenuID
 
TQPopupMenu * m_pSystemMenu
 
TQSize m_oldClientMinSize
 
TQSize m_oldClientMaxSize
 
TQLayout::ResizeMode m_oldLayoutResizeMode
 
TQTime m_timeMeasure
 

Friends

class KMdiChildArea
 
class KMdiChildFrmCaption
 

Detailed Description

Internal class.

It's an MDI child frame widget. It contains a view widget and a frame caption. Usually you derive from its view.

Definition at line 130 of file tdemdichildfrm.h.

Member Enumeration Documentation

◆ MdiWindowState

enum KMdiChildFrm::MdiWindowState

Definition at line 139 of file tdemdichildfrm.h.

Constructor & Destructor Documentation

◆ KMdiChildFrm()

KMdiChildFrm::KMdiChildFrm ( KMdiChildArea *  parent)

Creates a new KMdiChildFrm class.

Definition at line 101 of file tdemdichildfrm.cpp.

◆ ~KMdiChildFrm()

KMdiChildFrm::~KMdiChildFrm ( )

Destroys this KMdiChildFrm If a child is still here managed (no recreation was made) it is destroyed too.

Definition at line 171 of file tdemdichildfrm.cpp.

Member Function Documentation

◆ caption()

const TQString & KMdiChildFrm::caption ( )
inline

Gets the caption of this mdi child.

Definition at line 230 of file tdemdichildfrm.h.

◆ captionHeight()

int KMdiChildFrm::captionHeight ( ) const
inline

Returns the caption bar height.

Definition at line 271 of file tdemdichildfrm.h.

◆ closePressed

void KMdiChildFrm::closePressed ( )
protectedslot

Handles a click on the Close button.

Definition at line 491 of file tdemdichildfrm.cpp.

◆ doResize() [1/2]

void KMdiChildFrm::doResize ( )
protected

Does the actual resize.

Called from various places but from resizeEvent in general.

Definition at line 987 of file tdemdichildfrm.cpp.

◆ doResize() [2/2]

void KMdiChildFrm::doResize ( bool  captionOnly)
protected

Does the actual resize, like doResize() but skips resize of the client if captionOnly is true.

Todo:
: merge with doResize()

Definition at line 992 of file tdemdichildfrm.cpp.

◆ enableClose()

void KMdiChildFrm::enableClose ( bool  bEnable)

Enables or disables the close button.

Definition at line 694 of file tdemdichildfrm.cpp.

◆ eventFilter()

bool KMdiChildFrm::eventFilter ( TQObject *  obj,
TQEvent *  e 
)
protectedvirtual

Reimplemented from the base class.

In addition, the following are caught -the client's mousebutton press events which raises and activates the childframe -the client's resize event which resizes this widget as well

Definition at line 1077 of file tdemdichildfrm.cpp.

◆ getResizeCorner()

int KMdiChildFrm::getResizeCorner ( int  ax,
int  ay 
)
protected

Calculates the corner id for the resize cursor.

The return value can be tested for: KMDI_RESIZE_LEFT, KMDI_RESIZE_RIGHT, KMDI_RESIZE_TOP, KMDI_RESIZE_BOTTOM or an OR'd variant of them for the corners.

Definition at line 418 of file tdemdichildfrm.cpp.

◆ icon()

TQPixmap * KMdiChildFrm::icon ( ) const

Returns the child frame icon.

Definition at line 720 of file tdemdichildfrm.cpp.

◆ isInDrag()

bool KMdiChildFrm::isInDrag ( ) const
inline

returns the mouse state "In Drag"

Definition at line 281 of file tdemdichildfrm.h.

◆ isInResize()

bool KMdiChildFrm::isInResize ( ) const
inline

returns the mouse state "In Resize"

Definition at line 286 of file tdemdichildfrm.h.

◆ leaveEvent()

void KMdiChildFrm::leaveEvent ( TQEvent *  )
protectedvirtual

Reimplemented from the base class.

If not in resize mode, it sets the mouse cursor to normal appearance.

Definition at line 314 of file tdemdichildfrm.cpp.

◆ linkChildren()

void KMdiChildFrm::linkChildren ( TQDict< TQWidget::FocusPolicy > *  pFocPolDict)
protected

Restore the focus policies for all widgets in the view using the list given as parameter.

Install the event filter for all direct child widgets of this. (See KMdiChildFrm::eventFilter)

Definition at line 887 of file tdemdichildfrm.cpp.

◆ maximizePressed

void KMdiChildFrm::maximizePressed ( )
protectedslot

Handles a click on the Maximize button.

Definition at line 442 of file tdemdichildfrm.cpp.

◆ mdiAreaContentsRect()

TQRect KMdiChildFrm::mdiAreaContentsRect ( ) const

Returns the inner client area of the parent of this (which is KMdiChildArea).

Definition at line 1395 of file tdemdichildfrm.cpp.

◆ minimizePressed

void KMdiChildFrm::minimizePressed ( )
protectedslot

Handles a click on the Minimize button.

Definition at line 471 of file tdemdichildfrm.cpp.

◆ mouseMoveEvent()

void KMdiChildFrm::mouseMoveEvent ( TQMouseEvent *  e)
protectedvirtual

Reimplemented from the base class.

Detects if the mouse is on the edge of window and what resize cursor must be set. Calls KMdiChildFrm::resizeWindow if it is in m_bResizing.

Definition at line 273 of file tdemdichildfrm.cpp.

◆ mousePressEvent()

void KMdiChildFrm::mousePressEvent ( TQMouseEvent *  e)
protectedvirtual

Reimplemented from the base class.

Colours the caption, raises the childfrm widget and turns to resize mode if it is on the edge (resize-sensitive area)

Definition at line 183 of file tdemdichildfrm.cpp.

◆ mouseReleaseEvent()

void KMdiChildFrm::mouseReleaseEvent ( TQMouseEvent *  e)
protectedvirtual

Reimplemented from the base class.

Sets a normal cursor and leaves the resize mode.

Definition at line 210 of file tdemdichildfrm.cpp.

◆ moveEvent()

void KMdiChildFrm::moveEvent ( TQMoveEvent *  me)
protectedvirtual

Reimplemented from the base class.

give its child view the chance to notify a childframe move... that's why it sends a KMdiChildMovedEvent to the embedded KMdiChildView .

Definition at line 304 of file tdemdichildfrm.cpp.

◆ raiseAndActivate()

void KMdiChildFrm::raiseAndActivate ( )

Internally called from the signal focusInEventOccurs.

It raises the MDI childframe to the top of all other MDI child frames and sets the focus on it.

Definition at line 1209 of file tdemdichildfrm.cpp.

◆ redecorateButtons()

void KMdiChildFrm::redecorateButtons ( )

sets new raise behavior and pixmaps of the buttons depending on the current decoration style

Definition at line 1322 of file tdemdichildfrm.cpp.

◆ resizeEvent()

void KMdiChildFrm::resizeEvent ( TQResizeEvent *  )
protectedvirtual

Reimplemented from the base class.

Resizes the captionbar, relayouts the position of the system buttons, and calls resize for its embedded KMdiChildView with the proper size

Definition at line 982 of file tdemdichildfrm.cpp.

◆ resizeWindow()

void KMdiChildFrm::resizeWindow ( int  resizeCorner,
int  x,
int  y 
)
protected

Calculates the new geometry from the new mouse position given as parameters and calls KMdiChildFrm::setGeometry.

Definition at line 319 of file tdemdichildfrm.cpp.

◆ restoreGeometry()

TQRect KMdiChildFrm::restoreGeometry ( ) const

Returns the geometry that will be restored by calling restore().

Definition at line 673 of file tdemdichildfrm.cpp.

◆ restorePressed

void KMdiChildFrm::restorePressed ( )
protectedslot

Handles a click on the Restore (Normalize) button.

Definition at line 458 of file tdemdichildfrm.cpp.

◆ setCaption()

void KMdiChildFrm::setCaption ( const TQString &  text)

Sets the caption of this window.

Definition at line 687 of file tdemdichildfrm.cpp.

◆ setClient()

void KMdiChildFrm::setClient ( KMdiChildView *  w,
bool  bAutomaticResize = false 
)

Reparents the widget w to this KMdiChildFrm (if this is not already done) Installs an event filter to catch focus events.

Resizes this mdi child in a way that the child fits perfectly in.

Definition at line 726 of file tdemdichildfrm.cpp.

◆ setIcon()

void KMdiChildFrm::setIcon ( const TQPixmap &  pxm)

Sets the window icon pointer.

Definition at line 702 of file tdemdichildfrm.cpp.

◆ setMinimumSize()

void KMdiChildFrm::setMinimumSize ( int  minw,
int  minh 
)
virtual

Sets the minimum size of the widget to w by h pixels.

It extends it's base clase method in a way that the minimum size of the child area will be set additionally if the view is maximized.

Definition at line 1217 of file tdemdichildfrm.cpp.

◆ setResizeCursor()

void KMdiChildFrm::setResizeCursor ( int  resizeCorner)
protected

Override the cursor appearance depending on the widget corner given as parameter.

Definition at line 227 of file tdemdichildfrm.cpp.

◆ setRestoreGeometry()

void KMdiChildFrm::setRestoreGeometry ( const TQRect &  newRestGeo)

Sets the geometry that will be restored by calling restore().

Definition at line 680 of file tdemdichildfrm.cpp.

◆ setState()

void KMdiChildFrm::setState ( MdiWindowState  state,
bool  bAnimate = true 
)

Minimizes, Maximizes, or restores the window.

Todo:
: setting the maximum size doesn't work properly - fix this later m_pManager->setMaximumSize(pTopChild->maximumWidth(), pTopChild->maximumHeight());

Definition at line 511 of file tdemdichildfrm.cpp.

◆ showSystemMenu

void KMdiChildFrm::showSystemMenu ( )
protectedslot

Shows a system menu for child frame windows.

Definition at line 1278 of file tdemdichildfrm.cpp.

◆ slot_resizeViaSystemMenu

void KMdiChildFrm::slot_resizeViaSystemMenu ( )
slot

Definition at line 1314 of file tdemdichildfrm.cpp.

◆ state()

MdiWindowState KMdiChildFrm::state ( ) const
inline

Returns the current state of the window.

Definition at line 240 of file tdemdichildfrm.h.

◆ switchToMinimizeLayout()

void KMdiChildFrm::switchToMinimizeLayout ( )
protectedvirtual

That means to show a mini window showing the childframe's caption bar, only.

It cannot be resized.

Definition at line 1295 of file tdemdichildfrm.cpp.

◆ systemMenu()

TQPopupMenu * KMdiChildFrm::systemMenu ( ) const

Returns the system menu.

Definition at line 1228 of file tdemdichildfrm.cpp.

◆ undockPressed

void KMdiChildFrm::undockPressed ( )
protectedslot

Handles a click on the Undock (Detach) button.

Definition at line 499 of file tdemdichildfrm.cpp.

◆ unlinkChildren()

TQDict< TQWidget::FocusPolicy > * KMdiChildFrm::unlinkChildren ( )
protected

Backups all focus policies of all child widgets in the MDI childview since they get lost during a reparent.

Remove all event filters for all direct child widgets of this. (See KMdiChildFrm::eventFilter)

Definition at line 933 of file tdemdichildfrm.cpp.

◆ unsetClient()

void KMdiChildFrm::unsetClient ( TQPoint  positionOffset = TQPoint( 0, 0 ))

Reparents the client widget to 0 (desktop), moves with an offset from the original position Removes the event filter.

Definition at line 812 of file tdemdichildfrm.cpp.

◆ unsetResizeCursor()

void KMdiChildFrm::unsetResizeCursor ( )
protected

Changes from the resize cursor to the normal (previous) cursor.

Definition at line 260 of file tdemdichildfrm.cpp.

◆ updateRects()

void KMdiChildFrm::updateRects ( )
inline

Forces updating the rects of the caption and so... It may be useful when setting the mdiCaptionFont of the MdiManager.

Definition at line 261 of file tdemdichildfrm.h.

Friends And Related Function Documentation

◆ KMdiChildArea

friend class KMdiChildArea
friend

Definition at line 132 of file tdemdichildfrm.h.

◆ KMdiChildFrmCaption

friend class KMdiChildFrmCaption
friend

Definition at line 133 of file tdemdichildfrm.h.

Member Data Documentation

◆ m_bDragging

bool KMdiChildFrm::m_bDragging
protected

Definition at line 157 of file tdemdichildfrm.h.

◆ m_bResizing

bool KMdiChildFrm::m_bResizing
protected

Definition at line 156 of file tdemdichildfrm.h.

◆ m_iLastCursorCorner

int KMdiChildFrm::m_iLastCursorCorner
protected

Definition at line 155 of file tdemdichildfrm.h.

◆ m_iResizeCorner

int KMdiChildFrm::m_iResizeCorner
protected

Definition at line 154 of file tdemdichildfrm.h.

◆ m_oldClientMaxSize

TQSize KMdiChildFrm::m_oldClientMaxSize
protected

Definition at line 176 of file tdemdichildfrm.h.

◆ m_oldClientMinSize

TQSize KMdiChildFrm::m_oldClientMinSize
protected

Definition at line 175 of file tdemdichildfrm.h.

◆ m_oldLayoutResizeMode

TQLayout::ResizeMode KMdiChildFrm::m_oldLayoutResizeMode
protected

Definition at line 177 of file tdemdichildfrm.h.

◆ m_pCaption

KMdiChildFrmCaption* KMdiChildFrm::m_pCaption
protected

Definition at line 145 of file tdemdichildfrm.h.

◆ m_pClient

KMdiChildView* KMdiChildFrm::m_pClient

Definition at line 141 of file tdemdichildfrm.h.

◆ m_pClose

TQToolButton* KMdiChildFrm::m_pClose
protected

Definition at line 150 of file tdemdichildfrm.h.

◆ m_pCloseButtonPixmap

TQPixmap* KMdiChildFrm::m_pCloseButtonPixmap
protected

Definition at line 162 of file tdemdichildfrm.h.

◆ m_pIconButtonPixmap

TQPixmap* KMdiChildFrm::m_pIconButtonPixmap
protected

Definition at line 158 of file tdemdichildfrm.h.

◆ m_pManager

KMdiChildArea* KMdiChildFrm::m_pManager
protected

Definition at line 144 of file tdemdichildfrm.h.

◆ m_pMaxButtonPixmap

TQPixmap* KMdiChildFrm::m_pMaxButtonPixmap
protected

Definition at line 160 of file tdemdichildfrm.h.

◆ m_pMaximize

TQToolButton* KMdiChildFrm::m_pMaximize
protected

Definition at line 149 of file tdemdichildfrm.h.

◆ m_pMinButtonPixmap

TQPixmap* KMdiChildFrm::m_pMinButtonPixmap
protected

Definition at line 159 of file tdemdichildfrm.h.

◆ m_pMinimize

TQToolButton* KMdiChildFrm::m_pMinimize
protected

Definition at line 148 of file tdemdichildfrm.h.

◆ m_pRestoreButtonPixmap

TQPixmap* KMdiChildFrm::m_pRestoreButtonPixmap
protected

Definition at line 161 of file tdemdichildfrm.h.

◆ m_pSystemMenu

TQPopupMenu* KMdiChildFrm::m_pSystemMenu
protected

Imitates a system menu for child frame windows.

Definition at line 173 of file tdemdichildfrm.h.

◆ m_pUndock

TQToolButton* KMdiChildFrm::m_pUndock
protected

Definition at line 151 of file tdemdichildfrm.h.

◆ m_pUndockButtonPixmap

TQPixmap* KMdiChildFrm::m_pUndockButtonPixmap
protected

Definition at line 163 of file tdemdichildfrm.h.

◆ m_pUnixIcon

TQToolButton* KMdiChildFrm::m_pUnixIcon
protected

Definition at line 147 of file tdemdichildfrm.h.

◆ m_pWinIcon

KMdiWin32IconButton* KMdiChildFrm::m_pWinIcon
protected

Definition at line 146 of file tdemdichildfrm.h.

◆ m_restoredRect

TQRect KMdiChildFrm::m_restoredRect
protected

Definition at line 153 of file tdemdichildfrm.h.

◆ m_state

MdiWindowState KMdiChildFrm::m_state
protected

Definition at line 152 of file tdemdichildfrm.h.

◆ m_timeMeasure

TQTime KMdiChildFrm::m_timeMeasure
protected

Definition at line 178 of file tdemdichildfrm.h.

◆ m_windowMenuID

int KMdiChildFrm::m_windowMenuID
protected

Every child frame window has an temporary ID in the Window menu of the child area.

Definition at line 168 of file tdemdichildfrm.h.


The documentation for this class was generated from the following files:
  • tdemdichildfrm.h
  • tdemdichildfrm.cpp

tdemdi

Skip menu "tdemdi"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

tdemdi

Skip menu "tdemdi"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for tdemdi by doxygen 1.9.4
This website is maintained by Timothy Pearson.