interact.inl
上传用户:hzhsqp
上传日期:2007-01-06
资源大小:1600k
文件大小:27k
- /*
- * interact.inl
- *
- * Interactor classes inline functions.
- *
- * Portable Windows Library
- *
- * Copyright (c) 1993-1998 Equivalence Pty. Ltd.
- *
- * The contents of this file are subject to the Mozilla Public License
- * Version 1.0 (the "License"); you may not use this file except in
- * compliance with the License. You may obtain a copy of the License at
- * http://www.mozilla.org/MPL/
- *
- * Software distributed under the License is distributed on an "AS IS"
- * basis, WITHOUT WARRANTY OF ANY KIND, either express or implied. See
- * the License for the specific language governing rights and limitations
- * under the License.
- *
- * The Original Code is Portable Windows Library.
- *
- * The Initial Developer of the Original Code is Equivalence Pty. Ltd.
- *
- * Portions are Copyright (C) 1993 Free Software Foundation, Inc.
- * All Rights Reserved.
- *
- * Contributor(s): ______________________________________.
- *
- * $Log: interact.inl,v $
- * Revision 1.38 1999/11/16 05:19:36 craigs
- * Created PCustomListBox to allow native code PStringListBox implementation
- *
- * Revision 1.37 1999/11/13 12:38:20 craigs
- * Swapped ScrollBar nudge routines to get it right!
- *
- * Revision 1.36 1999/11/13 12:33:24 craigs
- * Moved scrollBar nudge routines to platform dependent code
- *
- * Revision 1.35 1999/08/25 05:13:33 robertj
- * Fixed problem with calling modal dialog from a background thread.
- *
- * Revision 1.34 1998/09/23 06:24:01 robertj
- * Added open source copyright license.
- *
- * Revision 1.33 1998/09/22 15:04:38 robertj
- * Fixed confusion in Font Dialog, variable at different levels with same name.
- *
- * Revision 1.32 1998/03/09 07:16:48 robertj
- * More implementation of file types.
- *
- * Revision 1.31 1998/03/09 01:43:52 robertj
- * Enhanced file types for standard file dialog.
- *
- * Revision 1.30 1998/02/06 04:00:15 robertj
- * Fixed colour of controls, again!
- *
- * Revision 1.29 1996/04/30 12:33:37 robertj
- * Changed "inPixels" boolean to enum for three coordinate systems.
- *
- * Revision 1.28 1995/12/23 03:49:08 robertj
- * Fixed ContainsPont() function.
- * Added FindWindow() function.
- *
- * Revision 1.27 1995/10/14 14:56:45 robertj
- * Changed return values to references for efficency.
- *
- * Revision 1.26 1995/07/31 12:04:24 robertj
- * Drag track documentation and semantic adjustment.
- *
- * Revision 1.25 1995/07/02 01:17:49 robertj
- * Added drag tracking support.
- *
- * Revision 1.24 1995/06/04 08:48:44 robertj
- * Added common constructor - Unix implementation requirement.
- *
- * Revision 1.23 1995/04/25 11:10:40 robertj
- * Moved functions to .cxx file to avoid triadic compiler problems.
- *
- * Revision 1.22 1995/04/22 00:45:07 robertj
- * Fixed missing call to common construction code in constructor.
- *
- * Revision 1.21 1995/04/02 09:27:22 robertj
- * Added "balloon" help.
- *
- * Revision 1.20 1995/02/19 04:19:11 robertj
- * Added dynamically linked command processing.
- *
- * Revision 1.19 1995/02/05 00:49:59 robertj
- * Had to change variable name "small" for MSVC 2.0
- *
- * Revision 1.18 1995/01/27 11:10:50 robertj
- * Changed alignment mask from enum to int.
- * Changed state of checkbox from CheckValue to BOOL.
- *
- * Revision 1.17 1995/01/22 07:29:37 robertj
- * Added font & colour standard dialogs.
- *
- * Revision 1.16 1995/01/21 05:17:02 robertj
- * Fixed incorrect parameter.
- *
- * Revision 1.15 1995/01/18 09:02:21 robertj
- * Added separate image icon for enabled and disabled button.
- *
- * Revision 1.14 1995/01/06 10:43:51 robertj
- * Changed PRealFont usage from pointer to reference.
- *
- * Revision 1.13 1995/01/02 12:25:26 robertj
- * Added update flag to list box select.
- * Added global cursor setting for wait cursor.
- *
- * Revision 1.12 1994/12/21 11:58:22 robertj
- * Documentation and variable normalisation.
- *
- * Revision 1.11 1994/12/14 11:17:09 robertj
- * Changed PDIMENSION to be unsigned causing untold number of changes.
- *
- * Revision 1.10 1994/12/12 10:16:21 robertj
- * Restructuring and documentation of container classes.
- * Renaming of some macros for declaring container classes.
- * Added some extra functionality to PString.
- * Added start to 2 byte characters in PString.
- * Fixed incorrect overrides in PCaselessString.
- *
- * Revision 1.9 1994/11/19 00:00:27 robertj
- * Added notifier & value to main PControl constructor
- *
- * Revision 1.8 1994/10/30 11:46:45 robertj
- * Changed mechanism for doing notification callback functions.
- *
- * Revision 1.7 1994/10/23 04:47:21 robertj
- * PScrollable implementation.
- * Moved some PTitledWindow functions to platform dependent code.
- *
- * Revision 1.6 1994/09/25 10:39:34 robertj
- * Moved ComboBox destructor to platform dependent code.
- *
- * Revision 1.5 1994/08/21 23:43:02 robertj
- * Added ability to get coordinates in pixels.
- *
- * Revision 1.4 1994/07/25 03:35:10 robertj
- * Added ability to change area in which MDI children are limited.
- *
- * Revision 1.3 1994/07/21 23:48:38 robertj
- * Moved some MDI functions to platform dependent files.
- *
- * Revision 1.2 1994/07/17 10:46:06 robertj
- * Added MDI title code.
- *
- * Revision 1.1 1994/06/25 11:55:15 robertj
- * Initial revision
- */
- ///////////////////////////////////////////////////////////////////////////////
- // PInteractor
- #if defined(_PINTERACTOR)
- PINLINE PInteractor::PInteractor(const PInteractor &)
- { }
- PINLINE PInteractor & PInteractor::operator=(const PInteractor &)
- { return *this; }
- PINLINE PInteractor & PInteractor::operator[](PINDEX index)
- { return children[index]; }
- PINLINE const PRealFont & PInteractor::GetFont()
- { return font; }
- PINLINE PInteractor * PInteractor::GetParent() const
- { return parent; }
- PINLINE void PInteractor::SetPosition(PORDINATE x,PORDINATE y,
- PositionOrigin xOrigin, PositionOrigin yOrigin)
- { _SetPosition(x, y, xOrigin, yOrigin); }
- PINLINE void PInteractor::SetPosition(const PPoint & org,
- PositionOrigin xOrigin, PositionOrigin yOrigin)
- { _SetPosition(org.X(), org.Y(), xOrigin, yOrigin); }
- PINLINE void PInteractor::SetDimensions(PDIMENSION width, PDIMENSION height,
- CoordinateSystem coords)
- { _SetDimensions(width, height, coords); }
- PINLINE void PInteractor::SetDimensions(const PDim & dim,
- CoordinateSystem coords)
- { _SetDimensions(dim.Width(), dim.Height(), coords); }
- PINLINE BOOL PInteractor::ContainsPoint(const PPoint & pt,
- CoordinateSystem coords) const
- { return GetStructureBounds(coords).ContainsPoint(pt); }
- PINLINE PInteractor * PInteractor::FindInteractor(const PPoint & pt,
- CoordinateSystem coords) const
- { return owner->FindInteractor(ToScreen(pt, coords)); }
- PINLINE void PInteractor::Invalidate(PORDINATE x, PORDINATE y,
- PDIMENSION dx, PDIMENSION dy,
- CoordinateSystem coords)
- { _Invalidate(x, y, dx, dy, coords); }
- PINLINE void PInteractor::Invalidate(const PRect & rect,
- CoordinateSystem coords)
- { _Invalidate(rect.X(), rect.Y(), rect.Width(), rect.Height(), coords); }
- PINLINE void PInteractor::Invalidate(const PPoint & pos,
- const PDim & dim,
- CoordinateSystem coords)
- { _Invalidate(pos.X(), pos.Y(), dim.Width(),dim.Height(), coords); }
- PINLINE void PInteractor::Invalidate(const PPoint & topLeft,
- const PPoint & botRight,
- CoordinateSystem coords)
- { _Invalidate(topLeft.X(), topLeft.Y(),
- (PDIMENSION)(botRight.X()-topLeft.X()),
- (PDIMENSION)(botRight.Y()-topLeft.Y()), coords); }
- PINLINE void PInteractor::Invalidate()
- { _Invalidate(0, 0, 32767, 32767, PixelCoords); }
- PINLINE void PInteractor::Validate(PORDINATE x, PORDINATE y,
- PDIMENSION dx, PDIMENSION dy,
- CoordinateSystem coords)
- { _Invalidate(x, y, dx, dy, coords); }
- PINLINE void PInteractor::Validate(const PRect & rect, CoordinateSystem coords)
- { _Invalidate(rect.X(), rect.Y(), rect.Width(), rect.Height(), coords); }
- PINLINE void PInteractor::Validate(const PPoint & topLeft,
- const PPoint & botRight,
- CoordinateSystem coords)
- { _Invalidate(topLeft.X(), topLeft.Y(),
- (PDIMENSION)(botRight.X()-topLeft.X()),
- (PDIMENSION)(botRight.Y()-topLeft.Y()), coords); }
- PINLINE void PInteractor::Validate()
- { _Invalidate(0, 0, 32767, 32767, PixelCoords); }
- PINLINE void PInteractor::Disable()
- { Enable(FALSE); }
- PINLINE void PInteractor::Hide()
- { Show(FALSE); }
- PINLINE PCursor PInteractor::GetCursor() const
- { return cursor; }
- PINLINE void PInteractor::SetWaitCursor()
- { SetAllCursors(PCursor(PSTD_ID_CURSOR_WAIT)); }
- PINLINE void PInteractor::SetCursorPos(PORDINATE x, PORDINATE y,
- CoordinateSystem coords)
- { _SetCursorPos(x, y, coords); }
- PINLINE void PInteractor::SetCursorPos(const PPoint & pt,
- CoordinateSystem coords)
- { _SetCursorPos(pt.X(), pt.Y(), coords); }
- PINLINE void PInteractor::HideCursor()
- { ShowCursor(FALSE); }
- PINLINE void PInteractor::SetCaret(const PCaret & newCaret)
- { caret = newCaret; }
- PINLINE PCaret PInteractor::GetCaret() const
- { return caret; }
- PINLINE void PInteractor::SetCaretPos(PORDINATE x, PORDINATE y,
- CoordinateSystem coords)
- { _SetCaretPos(x, y, coords); }
- PINLINE void PInteractor::SetCaretPos(const PPoint & pt,
- CoordinateSystem coords)
- { _SetCaretPos(pt.X(), pt.Y(), coords); }
- PINLINE void PInteractor::HideCaret()
- { ShowCaret(FALSE); }
- PINLINE void PInteractor::SetForegroundColour(const PColour & newColour)
- { foregroundColour = newColour; }
- PINLINE const PColour & PInteractor::GetForegroundColour() const
- { return foregroundColour; }
- PINLINE const PColour & PInteractor::GetBackgroundColour() const
- { return backgroundColour; }
- PINLINE PCanvas * PInteractor::StartMouseTrack(BOOL wantCanvas)
- { return StartMouseTrack(this, wantCanvas); }
- PINLINE PDIMENSION PInteractor::ToPixelsDX(PDIMENSION x) const
- { return (PDIMENSION)ToPixelsX((PDIMENSION)x); }
-
- PINLINE PDIMENSION PInteractor::ToPixelsDY(PDIMENSION y) const
- { return (PDIMENSION)ToPixelsY((PDIMENSION)y); }
-
- PINLINE PDim PInteractor::ToPixels(const PDim & dim) const
- { return PDim(ToPixelsDX(dim.Width()), ToPixelsDY(dim.Height())); }
-
- PINLINE PPoint PInteractor::ToPixels(const PPoint & pt) const
- { return PPoint(ToPixelsX(pt.X()), ToPixelsY(pt.Y())); }
-
- PINLINE PRect PInteractor::ToPixels(const PRect & r) const
- { return PRect(ToPixels(r.Origin()), ToPixels(r.Corner())); }
-
- PINLINE PDIMENSION PInteractor::FromPixelsDX(PDIMENSION x) const
- { return (PDIMENSION)FromPixelsX((PDIMENSION)x); }
-
- PINLINE PDIMENSION PInteractor::FromPixelsDY(PDIMENSION y) const
- { return (PDIMENSION)FromPixelsY((PDIMENSION)y); }
-
- PINLINE PDim PInteractor::FromPixels(const PDim & dim) const
- { return PDim(FromPixelsDX(dim.Width()), FromPixelsDY(dim.Height())); }
-
- PINLINE PPoint PInteractor::FromPixels(const PPoint & pt) const
- { return PPoint(FromPixelsX(pt.X()), FromPixelsY(pt.Y())); }
-
- PINLINE PRect PInteractor::FromPixels(const PRect & r) const
- { return PRect(FromPixels(r.Origin()), FromPixels(r.Corner())); }
-
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PBalloon
- PINLINE const PString & PBalloon::GetText() const
- { return balloonText; }
- //////////////////////////////////////////////////////////////////////////////
- // PScrollable & PScroller
- #if defined(_PSCROLLABLE)
- PINLINE PVerticalScrollBar & PScroller::GetVerticalScrollBar() const
- { return *vScroll; }
- PINLINE PHorizontalScrollBar & PScroller::GetHorizontalScrollBar() const
- { return *hScroll; }
- PINLINE PRect PScrollable::GetScrollRange() const
- { return scrollRange; }
- PINLINE void PScrollable::SetScaleFactor(PORDINATE x, PORDINATE y)
- { SetScaleFactor(PPoint(x, y)); }
- PINLINE PPoint PScrollable::GetScaleFactor() const
- { return scaleFactor; }
- PINLINE PPoint PScrollable::GetOrigin() const
- { return origin; }
- PINLINE void PScrollable::ScrollTo(PORDINATE x, PORDINATE y)
- { ScrollTo(PPoint(x, y)); }
- PINLINE void PScrollable::ScrollBy(const PPoint & delta)
- { ScrollTo(origin + delta); }
- PINLINE void PScrollable::ScrollBy(PORDINATE dx, PORDINATE dy)
- { ScrollBy(PPoint(dx, dy)); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PControl
- #if defined(_PCONTROL)
- PINLINE PControl::~PControl()
- { }
- PINLINE PRESOURCE_ID PControl::GetControlID() const
- { return controlID; }
-
- PINLINE const PNotifier & PControl::GetNotifier() const
- { return callback; }
- PINLINE BOOL PControl::WillNotifyOnStateUpdate() const
- { return notifyForStateUpdate; }
- PINLINE void PControl::SetNotifier(const PNotifier & func, BOOL update)
- { callback = func; notifyForStateUpdate = update; }
- PINLINE void * PControl::GetValuePointer() const
- { return valuePointer; }
- PINLINE void PControl::SetValuePointer(void * ptr)
- { valuePointer = ptr; }
- PINLINE const PString & PControl::GetBalloonHelp() const
- { return balloonHelpText; }
- PINLINE void PControl::SetBalloonHelp(const PString & text)
- { balloonHelpText = text; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PNamedControl
- #if defined(_PNAMEDCONTROL)
- PINLINE PNamedControl::PNamedControl(PInteractor * parent)
- : PControl(parent, PNotifier(), NULL) { }
- PINLINE PNamedControl::~PNamedControl()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PStaticText
- #if defined (_PSTATICTEXT)
- PINLINE PStaticText::~PStaticText()
- { }
- PINLINE int PStaticText::GetAlignment() const
- { return alignment; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PStaticIcon
- #if defined (_PSTATICICON)
- PINLINE PStaticIcon::PStaticIcon(PInteractor * parent)
- : PControl(parent, PNotifier(), NULL),
- icon(PSTD_ID_ICON_INFORMATION) { }
- PINLINE PStaticIcon::~PStaticIcon()
- { }
- PINLINE PIcon PStaticIcon::GetIcon() const
- { return icon; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PStaticBox
- #if defined (_PSTATICBOX)
- PINLINE PStaticBox::~PStaticBox()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PEditBox
- #if defined(_PEDITBOX)
- PINLINE PEditBox::PEditBox(PInteractor * parent)
- : PControl(parent, PNotifier(), NULL) { Construct(); }
- PINLINE PString * PEditBox::GetValuePointer() const
- { return (PString *)PControl::GetValuePointer(); }
- PINLINE void PEditBox::SetValuePointer(PString * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PPasswordEditBox
- #if defined(_PPASSWORDEDITBOX)
- PINLINE PPasswordEditBox::PPasswordEditBox(PInteractor * parent)
- : PEditBox(parent) { Construct(); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PMultiLineEditBox
- #if defined(_PMULTILINEEDITBOX)
- PINLINE PMultiLineEditBox::PMultiLineEditBox(PInteractor * parent)
- : PEditBox(parent) { Construct(); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PNumberEditBox
- #if defined(_PNUMBEREDITBOX)
- PINLINE PNumberEditBox::~PNumberEditBox()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PIntegerEditBox
- #if defined(_PINTEGEREDITBOX)
- PINLINE PIntegerEditBox::~PIntegerEditBox()
- { }
- PINLINE long * PIntegerEditBox::GetValuePointer() const
- { return (long *)PControl::GetValuePointer(); }
- PINLINE void PIntegerEditBox::SetValuePointer(long * ptr)
- { PControl::SetValuePointer(ptr); }
- PINLINE void PIntegerEditBox::SetMaximum(long val)
- { maximum = val; }
- PINLINE long PIntegerEditBox::GetMaximum()
- { return maximum; }
- PINLINE void PIntegerEditBox::SetMinimum(long val)
- { minimum = val; }
- PINLINE long PIntegerEditBox::GetMinimum()
- { return minimum; }
- PINLINE long PIntegerEditBox::GetNudge()
- { return nudge; }
- PINLINE BYTE PIntegerEditBox::GetBase()
- { return base; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PFloatEditBox
- #if defined(_PFLOATEDITBOX)
- PINLINE PFloatEditBox::~PFloatEditBox()
- { }
- PINLINE double * PFloatEditBox::GetValuePointer() const
- { return (double *)PControl::GetValuePointer(); }
- PINLINE void PFloatEditBox::SetValuePointer(double * ptr)
- { PControl::SetValuePointer(ptr); }
- PINLINE void PFloatEditBox::SetMaximum(double val)
- { maximum = val; }
- PINLINE double PFloatEditBox::GetMaximum()
- { return maximum; }
- PINLINE void PFloatEditBox::SetMinimum(double val)
- { minimum = val; }
- PINLINE double PFloatEditBox::GetMinimum()
- { return minimum; }
- PINLINE void PFloatEditBox::SetNudge(double val)
- { nudge = val; }
- PINLINE double PFloatEditBox::GetNudge()
- { return nudge; }
- PINLINE void PFloatEditBox::SetDecimals(unsigned val)
- { decimals = val; }
- PINLINE unsigned PFloatEditBox::GetDecimals()
- { return decimals; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PPushButton
- #if defined(_PPUSHBUTTON)
- PINLINE PPushButton::~PPushButton()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PTextButton
- #if defined(_PTEXTBUTTON)
- PINLINE PTextButton::PTextButton(PInteractor * parent, ButtonType deflt)
- : PPushButton(parent, deflt) { }
- PINLINE PTextButton::~PTextButton()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PImageButton
- #if defined(_PIMAGEBUTTON)
- PINLINE PImageButton::~PImageButton()
- { }
- PINLINE void PImageButton::SetImage(const PImgIcon & img)
- { enabledImage = disabledImage = img; }
- PINLINE void PImageButton::SetImage(const PImgIcon & enabledImg,
- const PImgIcon & disabledImg)
- { enabledImage = enabledImg; disabledImage = disabledImg; }
- PINLINE PImgIcon PImageButton::GetEnabledImage() const
- { return enabledImage; }
- PINLINE PImgIcon PImageButton::GetDisabledImage() const
- { return disabledImage; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PCheck3WayBox
- #if defined(_PCHECK3WAYBOX)
- PINLINE PCheck3WayBox::~PCheck3WayBox()
- { }
- PINLINE PCheck3WayBox::CheckValues * PCheck3WayBox::GetValuePointer() const
- { return (CheckValues *)PControl::GetValuePointer(); }
- PINLINE void PCheck3WayBox::SetValuePointer(CheckValues * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PCheckBox
- #if defined(_PCHECKBOX)
- PINLINE PCheckBox::~PCheckBox()
- { }
- PINLINE BOOL PCheckBox::GetValue() const
- { return PCheck3WayBox::GetValue() == Checked; }
- PINLINE void PCheckBox::SetValue(BOOL newVal)
- { PCheck3WayBox::SetValue(newVal ? Checked : Unchecked); }
- PINLINE BOOL * PCheckBox::GetValuePointer() const
- { return (BOOL *)PControl::GetValuePointer(); }
- PINLINE void PCheckBox::SetValuePointer(BOOL * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PRadioButton
- #if defined(_PRADIOBUTTON)
- PINLINE PRadioButton::~PRadioButton()
- { }
- PINLINE PINDEX * PRadioButton::GetValuePointer() const
- { return (PINDEX *)PControl::GetValuePointer(); }
- PINLINE void PRadioButton::SetValuePointer(PINDEX * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PChoiceBox
- #if defined(_PCHOICEBOX)
- PINLINE PINDEX * PChoiceBox::GetValuePointer() const
- { return (PINDEX *)PControl::GetValuePointer(); }
- PINLINE void PChoiceBox::SetValuePointer(PINDEX * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PListBox
- #if defined(_PLISTBOX)
- PINLINE void PListBox::AllowDeleteObjects(BOOL yes)
- { deleteObjects = yes; }
- PINLINE void PListBox::DisallowDeleteObjects()
- { deleteObjects = FALSE; }
- PINLINE void PListBox::Deselect(PINDEX index, BOOL update)
- { Select(index, update, FALSE); }
- PINLINE PINDEX * PListBox::GetValuePointer() const
- { return (PINDEX *)PControl::GetValuePointer(); }
- PINLINE void PListBox::SetValuePointer(PINDEX * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PStringListBox
- #if defined(_PSTRINGLISTBOX)
- PINLINE PStringListBox::PStringListBox(PInteractor * parent,
- StringSorting sorted, SelectType select, PDIMENSION columnWidth)
- : PListBox(parent, sorted, select, columnWidth) { AllowDeleteObjects(); }
- PINLINE PStringListBox::~PStringListBox()
- { }
- PINLINE PString PStringListBox::GetSelectedString() const
- { return GetString(GetSelection()); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PComboBox
- #if defined(_PCOMBOBOX)
- PINLINE PString * PComboBox::GetValuePointer() const
- { return (PString *)PControl::GetValuePointer(); }
- PINLINE void PComboBox::SetValuePointer(PString * ptr)
- { PControl::SetValuePointer(ptr); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PScrollBar
- #if defined(_PSCROLLBAR)
- PINLINE PScrollBar::~PScrollBar()
- { }
- PINLINE PSCROLLBAR_VALUE * PScrollBar::GetValuePointer() const
- { return (PSCROLLBAR_VALUE *)PControl::GetValuePointer(); }
- PINLINE void PScrollBar::SetValuePointer(PSCROLLBAR_VALUE * ptr)
- { PControl::SetValuePointer(ptr); }
- PINLINE PSCROLLBAR_VALUE PScrollBar::GetMaximum() const
- { return maximum; }
- PINLINE PSCROLLBAR_VALUE PScrollBar::GetMinimum() const
- { return minimum; }
- PINLINE PSCROLLBAR_VALUE PScrollBar::GetValue() const
- { return value; }
- PINLINE PSCROLLBAR_VALUE PScrollBar::GetSmallNudge() const
- { return smallNudge; }
- PINLINE PSCROLLBAR_VALUE PScrollBar::GetLargeNudge() const
- { return largeNudge; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PDialog
- #if defined(_PDIALOG)
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PModalDialog
- #if defined(_PMODALDIALOG)
- PINLINE PModalDialog::PModalDialog(PInteractor * parent)
- : PDialog(parent) { Construct(); }
- PINLINE PModalDialog::PModalDialog(PInteractor * parent, PRESOURCE_ID resID)
- : PDialog(parent, resID) { Construct(); }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PFileDialog
- #if defined(_PFILEDIALOG)
- PINLINE void PFileDialog::SetDirectory(const PDirectory & dir)
- { directory = dir; }
-
- PINLINE const PDirectory & PFileDialog::GetDirectory() const
- { return directory; }
-
- PINLINE void PFileDialog::SetDefaultFilename(const PString & fname)
- { defaultFilename = fname; }
-
- PINLINE const PFilePath & PFileDialog::GetFile() const
- { return file; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // POpenFileDialog
- #if defined(_POPENFILEDIALOG)
- PINLINE POpenFileDialog::~POpenFileDialog()
- { }
- PINLINE PStringArray POpenFileDialog::GetFileTypes() const
- { return fileTypes; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PSaveFileDialog
- #if defined(_PSAVEFILEDIALOG)
- PINLINE PSaveFileDialog::~PSaveFileDialog()
- { }
- PINLINE void PSaveFileDialog::SetDefaultFileType(const PString & type)
- { defaultType = type; }
- PINLINE PString PSaveFileDialog::GetDefaultFileType() const
- { return defaultType; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // POpenDirDialog
- #if defined(_POPENDIRDIALOG)
- PINLINE POpenDirDialog::~POpenDirDialog()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PPrintDialog
- #ifdef _PPRINTDIALOG
- PINLINE const PPrintInfo & PPrintDialog::GetPrintInfo() const
- { return printInfo; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PPrinterSetupDialog
- #ifdef _PPRINTERSETUPDIALOG
- PINLINE PPrinterSetupDialog::~PPrinterSetupDialog()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PPrintJobDialog
- #ifdef _PPRINTJOBDIALOG
- PINLINE PPrintJobDialog::~PPrintJobDialog()
- { }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PFontDialog
- #ifdef _PFONTDIALOG
- PINLINE const PFont & PFontDialog::GetSelectedFont() const
- { return selectedFont; }
- #endif
- //////////////////////////////////////////////////////////////////////////////
- // PColourDialog
- #ifdef _PCOLOURDIALOG
- PINLINE const PColour & PColourDialog::GetColour() const
- { return colour; }
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // PTitledWindow
- #if defined(_PTITLEDWINDOW)
- PINLINE void PTitledWindow::SetMinSize(
- PDIMENSION x, PDIMENSION y, CoordinateSystem coords)
- { SetMinSize(PDim(x, y), coords); }
- PINLINE void PTitledWindow::SetMaxSize(
- PDIMENSION x, PDIMENSION y, CoordinateSystem coords)
- { SetMaxSize(PDim(x, y), coords); }
- PINLINE void PTitledWindow::SetZoomSize(
- PDIMENSION x, PDIMENSION y, CoordinateSystem coords)
- { SetZoomSize(PDim(x, y), coords); }
- PINLINE const PIcon & PTitledWindow::GetIcon()
- { return icon; }
-
-
- #endif
- ///////////////////////////////////////////////////////////////////////////////
- // PTopLevelWindow
- #if defined(_PTOPLEVELWINDOW)
- PINLINE PRootMenu * PTopLevelWindow::GetMenu() const
- { return menu; }
- #endif
- // End Of File ///////////////////////////////////////////////////////////////