home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
cset21v1.zip
/
IBMCPP
/
IBMCLASS
/
IWINDOW.INL
< prev
Wrap
Text File
|
1993-10-22
|
4KB
|
109 lines
#ifndef _IWINDOW_INL_
#define _IWINDOW_INL_ 0
/*******************************************************************************
* FILE NAME: iwindow.inl *
* *
* DESCRIPTION: *
* This file contains the definition of the inline functions for the *
* class(es) declared in iwindow.hpp. *
* *
* COPYRIGHT: *
* Licensed Materials - Property of IBM *
* (C) Copyright IBM Corporation 1992, 1993 *
* All Rights Reserved *
* US Government Users Restricted Rights - Use, duplication, or *
* disclosure *
* restricted by GSA ADP Schedule Contract with IBM Corp. *
* *
*******************************************************************************/
#ifndef _IWINDOW_
#undef _IWINDOW_INL_
#define _IWINDOW_INL_ 1
#include <iwindow.hpp>
#endif
#if _IWINDOW_INL_
#define inline
#endif
inline IBase::Boolean IWindow ::isAutoDeleteObject ( ) const
{
return ((ulClState & IWindow::autoDeleteObject) ? true : false);
}
inline IBase::Boolean IWindow::isAutoDestroyWindow ( ) const
{
return ((ulClState & IWindow::autoDestroyWindow) ? true : false);
}
inline IBase::Boolean IWindow::deleteIsInProcess ( ) const
{
return ((ulClState & IWindow::deleteInProcess) ? true : false);
}
inline IBase::Boolean IWindow::isPrimaryWindow ( ) const
{
return ((ulClState & IWindow::primaryWindow) ? true : false);
}
inline IWindow& IWindow::setDeleteInProcess ( )
{
ulClState |= IWindow::deleteInProcess;
return *this;
}
inline IWindow& IWindow::setMinimumSize(const ISize& sizMin)
/**************************************************************/
/* Set the minimum allowable size of the window. In the */
/* library this only apply to window on a canvas. */
/**************************************************************/
{
sizClMin = sizMin;
setLayoutDistorted(IWindow::minimumSizeChanged, 0);
return *this;
}
inline ISize IWindow::minimumSize() const
/**************************************************************/
/* Returns the minimum allowable size set by the user's class */
/**************************************************************/
{
if (sizClMin.width()==-1 && sizClMin.height()==-1)
return calcMinimumSize();
else
return ISize(sizClMin);
}
inline IWindow& IWindow::defaultProcedure(IEvent& evt)
/***************************************************************/
/* Call the default window procedure. */
/***************************************************************/
{
IEventResult er ( pClDefWinProc(evt.handle(), evt.eventId(),
evt.parameter1(), evt.parameter2()) );
evt.setResult(er);
return *this;
}
inline IEventResult IWindow :: sendEvent ( unsigned long eventId,
const IEventParameter1 &parm1,
const IEventParameter2 &parm2 ) const
/*------------------------------------------------------------------------------
Construct an IEvent from the arguments and send it to this window. Return
the event result.
------------------------------------------------------------------------------*/
{
return handle().sendEvent(eventId, parm1, parm2);
}
/* WindowList key function */
inline unsigned long const& key (IWindow* const& k)
{
return k->wndhCl;
}
#endif // _IWINDOW_INL_