| "Q" Classes | Subsystem list | Top level |
DragMouse.
This method of QChildWin and QAnyWin presses the mouse button at a given location, moves the mouse (with the button held down) to another given location, and releases the mouse button.
void
| DragMouse
| (integer iFromX, integer iFromY, integer iToX, integer iToY,
integer iSteps optional)
|
iFromX, iFromYiToX, iToYiStepsWindowParent
(not to be confused with the WindowParent method), which returns
the window inside which a given window is declared.
Because of a QA Partner bug, the built-in WindowParent crashes
QAP when used on a dynamically instantiated window. Therefore, you should
always use this method instead.
window GetDeclaredParent ()
string GetMainPaneID ()
MoveableWin,
(includes MoveableWin, ChildWin, and DialogBox),
then this method returns the window itself.
Otherwise, this method returns the nearest ancestor (parent or enclosing)
window that belongs to the class MoveableWin.
This method is useful when you have a window variable that refers
to a control or gadget, and you want to do something like make it
the current active window (SetActive). Since you can't
call that method on the control or gadget itself, you must obtain
its enclosing MoveableWin window.
window GetMoveableWindow ()
ReturnsMoveableWindow
(counting the window itself).// This routine copies the contents of one text field
// to another text field. Note that the two text fields
// may be in different parent windows.
void CopyTextContents (window wFrom, window wTo)
{
wFrom.GetMoveableWindow.SetActive();
string s = wFrom.GetText();
wTo.GetMoveableWindow.SetActive();
wTo.SetText(s);
}
CUlogGuiAction.
window GetDeclaredParent ()
string GetUIshellClass ()
Note that QA Partner always uses local coordinates. Global coordinates are generally only useful as intermediate values when converting a point from the coordinate system of one window to the coordinate system of another window (see example).
void
| GlobalToLocal
| (integer iGlobalX, integer iGlobalY,
out integer iLocalX, out integer iLocalY)
|
iGlobalX, iGlobalYiLocalX, iLocalY// convert a point to a different window's coordinate system integer iX, iY; window w1, w2; w1.GetSomeRandomPoint(iX, iY); w1.LocalToGlobal(iX, iY, iX, iY); w2.GlobalToLocal(iX, iY, iX, iY);
Invoke method (from ChildWin),
this method calls the window's Init and
MoveToMakeVisible methods.
These steps help ensure that the window will actually be usable
after calling Invoke.
void
| Invoke
| ()
|
If you are writing scripts for PRODUCT and related products, you may also want to see Window Management for more related methods.
boolean IsPointVisible (integer iX, integer iY, out string sWhatsInTheWay optional);
iX, iY
ReturnsTRUE if the point is visible,
FALSE if the point is obscured by some other window.sWhatsInTheWayNote that QA Partner always uses local coordinates. Global coordinates are generally only useful as intermediate values when converting a point from the coordinate system of one window to the coordinate system of another window (see example).
void
| LocalToGlobal
| (integer iLocalX, integer iLocalY,
out integer iGlobalX, out integer iGlobalY)
|
iLocalX, iLocalYiGlobalX, iGlobalY// convert a point to a different window's coordinate system integer iX, iY; window w1, w2; w1.GetSomeRandomPoint(iX, iY); w1.LocalToGlobal(iX, iY, iX, iY); w2.GlobalToLocal(iX, iY, iX, iY);
If you are writing scripts for PRODUCT and related products, you may also want to see Window Management for more related methods.
void MoveProportionate (real rXpos, real rYpos,
real rXsize optional NULL, real rYsize optional NULL, RECT rSpace optional);
rXpos, rYpos
(this)
to the center of the given RECT, specify 0.5 for both rXpos
and rYpos.
rXsize, rYsize
(this)
one quarter the size of its enclosing RECT,
specify 0.25 for both rXsize and rYsize.
rSpace
A problem that can occur when using the default RECT is that the proportions and placement
of the windows will be different depending on the number of physical monitors on the computer.
This can result in 'stretched' windows on two-monitor systems and also doesn't account for the
differing amounts of available space on the different configurations.
Note: If you are passing a RECT but are not doing any sizing, each size parameter must be passed with a value of 'NULL'.
wWindow.MoveProportionate(.65, .3); //Move proportionate to Main Window/Client Area (no sizing). wWindow.MoveProportionate(.65, .3, .3, .2); //Move and Size proportionate to Main Window/Client Area. RECT rRect = GetMyNeededRect(); wWindow.MoveProportionate(.65, .3, NULL, NULL, rRect); //Move proportionate to supplied RECT (no sizing). wWindow.MoveProportionate(.65, .3, .3, .2, rRect); //Move and Size proportionate to supplied RECT.
If the window is not completely visible, this method attempts to move the window to make it completely visible. If it succeeds, it returns TRUE.
If the window is too large to be made completely visible without resizing, this method moves the window to the upper left corner of the screen (Mac) or its main window (NT), and returns FALSE. This method does not attempt to resize the window.
Note: this method does not take into account any floating (always on top) windows that may be partly or completely obscuring the window that is being made visible.
void MoveToMakeVisible ()
ReturnsIf you are writing scripts for PRODUCT and related products, you may also want to see Window Management for more related methods.
void SizeProportionate (real rXsize, real rYsize, RECT rSpace optional);
rXsize, rYsize
(this)
one quarter the size of its enclosing RECT,
specify 0.25 for both rXsize and rYsize.
rSpace
A problem that can occur when using the default RECT is that the proportions and placement
of the windows will be different depending on the number of physical monitors on the computer.
This can result in 'stretched' windows on two-monitor systems and also doesn't account for the
differing amounts of available space on the different configurations.
wWindow.SizeProportionate(.3, .2); //Size proportionate to Main Window/Client Area. RECT rRect = GetMyNeededRect(); wWindow.SizeProportionate(.3, .2, rRect); //Size proportionate to supplied RECT.
If you are writing scripts for PRODUCT and related products, you may also want to see Window Management for more related methods.
void VerifyPointVisible (integer iX, integer iY);
iX, iY
Sleep function
to wait for an operation to complete.
real WaitForIdle (number nMinSeconds, number nMaxSeconds, string sWaitingFor);
nMinSeconds
nMaxSeconds
sWaitingFor
Returns