|
Operator Console
|
A class that resizes and centers dialog objects within a parent window. More...
#include <ResizeDlg.h>
Public Member Functions | |
| ResizeDlg (void) | |
| virtual | ~ResizeDlg (void) |
| void | GetImageWindowDelta (int width, int height) |
| Calculates the differences in window height and width between the current and new sizes. More... | |
| void | OffsetWindowSize (CWnd *wnd, int dx, int dy) |
| Changes the window size. More... | |
| void | OffsetWindowPos (CWnd *parent, CWnd *wnd, int dx, int dy) |
| Changes the window position. More... | |
| void | Resize (CWnd *dialog, CWnd *window, int width, int height) |
| Resizes an object within a parent window but does not allow the object to shrink vertically. More... | |
| void | BidirectionalResize (CWnd *dialog, CWnd *window, int width, int height) |
| Resizes an object within a parent window that allows the object to shrink vertically, but not below a minimum size. More... | |
| ResizeDlg (void) | |
| virtual | ~ResizeDlg (void) |
| void | GetImageWindowDelta (int width, int height) |
| void | OffsetWindowSize (CWnd *wnd, int dx, int dy) |
| void | OffsetWindowPos (CWnd *parent, CWnd *wnd, int dx, int dy) |
| void | Resize (CWnd *dialog, CWnd *window, int width, int height) |
| void | BidirectionalResize (CWnd *dialog, CWnd *window, int width, int height) |
Static Public Member Functions | |
| static void | CenterWindow (CWnd *parent, CWnd *wnd, bool horizontal=true, bool vertical=true) |
| A function that centers an object with respect to the parent with the option to select only vertical or horizontal centering. More... | |
| static void | GetWindowCenter (CWnd *wnd, CRect *bnds, CPoint *center) |
| static void | GetWindowSize (CWnd *wnd, int *width, int *height, CRect *bnds=NULL, bool client=false) |
| A function that acquires either the window or client size. More... | |
| static BOOL CALLBACK | OffsetChildPos (HWND hwnd, LPARAM lParam) |
| static void | CenterWindow (CWnd *parent, CWnd *wnd, bool horizontal=true, bool vertical=true) |
| static void | GetWindowCenter (CWnd *wnd, CRect *bnds, CPoint *center) |
| static void | GetWindowSize (CWnd *wnd, int *width, int *height, CRect *bnds=NULL, bool client=false) |
| static BOOL CALLBACK | OffsetChildPos (HWND hwnd, LPARAM lParam) |
Protected Attributes | |
| CSize | m_delta |
| CWnd * | m_dialog |
| CWnd * | m_window |
A class that resizes and centers dialog objects within a parent window.
| ResizeDlg::ResizeDlg | ( | void | ) |
|
virtual |
| void ResizeDlg::BidirectionalResize | ( | CWnd * | dialog, |
| CWnd * | window, | ||
| int | width, | ||
| int | height | ||
| ) |
Resizes an object within a parent window that allows the object to shrink vertically, but not below a minimum size.
| *dialog | pointer to the parent window |
| *window | pointer to the object to be resized |
| width | the new width in pixels |
| height | the new height in pixels |
References CenterWindow(), MoveData::delta, MoveData::dialog, GetImageWindowDelta(), GetWindowSize(), m_delta, m_dialog, m_window, OffsetChildPos(), OffsetWindowSize(), and MoveData::skip.
Referenced by COperatorConsoleDlg::ReInitDialog().
| void ResizeDlg::BidirectionalResize | ( | CWnd * | dialog, |
| CWnd * | window, | ||
| int | width, | ||
| int | height | ||
| ) |
|
static |
A function that centers an object with respect to the parent with the option to select only vertical or horizontal centering.
| *parent | pointer to the parent window |
| *wnd | pointer to the object to be centered |
| horizontal | set to TRUE if horizontal centering is desired |
| vertical | set to TRUE if vertical centering is desired |
Referenced by BidirectionalResize(), and Resize().
|
static |
| void ResizeDlg::GetImageWindowDelta | ( | int | width, |
| int | height | ||
| ) |
Calculates the differences in window height and width between the current and new sizes.
References GetWindowSize(), m_delta, and m_window.
Referenced by BidirectionalResize(), and Resize().
| void ResizeDlg::GetImageWindowDelta | ( | int | width, |
| int | height | ||
| ) |
|
static |
|
static |
|
static |
A function that acquires either the window or client size.
Note that the client size does not include the window border, whereas the window size does.
| *wnd | the window |
| *width | pointer to an int into which the width is stored |
| *height | pointer to an int into which the height is stored |
| *bnds | [OPTIONAL] a CRect to store the window dimensions; supply NULL if not desired |
| client | Supply TRUE if the client size is desired, FALSE if the window size is desired |
Referenced by BidirectionalResize(), GetImageWindowDelta(), OffsetWindowSize(), and COperatorConsoleDlg::QsoMove().
|
static |
|
static |
|
static |
References MoveData::delta, MoveData::dialog, height, MoveData::skip, and width.
Referenced by BidirectionalResize(), and Resize().
| void ResizeDlg::OffsetWindowPos | ( | CWnd * | parent, |
| CWnd * | wnd, | ||
| int | dx, | ||
| int | dy | ||
| ) |
| void ResizeDlg::OffsetWindowPos | ( | CWnd * | parent, |
| CWnd * | wnd, | ||
| int | dx, | ||
| int | dy | ||
| ) |
| void ResizeDlg::OffsetWindowSize | ( | CWnd * | wnd, |
| int | dx, | ||
| int | dy | ||
| ) |
Changes the window size.
References GetWindowSize(), height, and width.
Referenced by BidirectionalResize(), and Resize().
| void ResizeDlg::OffsetWindowSize | ( | CWnd * | wnd, |
| int | dx, | ||
| int | dy | ||
| ) |
| void ResizeDlg::Resize | ( | CWnd * | dialog, |
| CWnd * | window, | ||
| int | width, | ||
| int | height | ||
| ) |
| void ResizeDlg::Resize | ( | CWnd * | dialog, |
| CWnd * | window, | ||
| int | width, | ||
| int | height | ||
| ) |
Resizes an object within a parent window but does not allow the object to shrink vertically.
| dialog | pointer to the parent window |
| window | pointer to the object to be resized |
| width | the new width in pixels |
| height | the new height in pixels |
References CenterWindow(), MoveData::delta, MoveData::dialog, GetImageWindowDelta(), m_delta, m_dialog, m_window, OffsetChildPos(), OffsetWindowSize(), and MoveData::skip.
Referenced by COperatorConsoleDlg::OnInitDialog().
|
protected |
Referenced by BidirectionalResize(), GetImageWindowDelta(), and Resize().
|
protected |
Referenced by BidirectionalResize(), and Resize().
|
protected |
Referenced by BidirectionalResize(), GetImageWindowDelta(), and Resize().
1.8.6