1*0bdb6530SAndrew Rist# ************************************************************* 2*0bdb6530SAndrew Rist# 3*0bdb6530SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*0bdb6530SAndrew Rist# or more contributor license agreements. See the NOTICE file 5*0bdb6530SAndrew Rist# distributed with this work for additional information 6*0bdb6530SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*0bdb6530SAndrew Rist# to you under the Apache License, Version 2.0 (the 8*0bdb6530SAndrew Rist# "License"); you may not use this file except in compliance 9*0bdb6530SAndrew Rist# with the License. You may obtain a copy of the License at 10*0bdb6530SAndrew Rist# 11*0bdb6530SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*0bdb6530SAndrew Rist# 13*0bdb6530SAndrew Rist# Unless required by applicable law or agreed to in writing, 14*0bdb6530SAndrew Rist# software distributed under the License is distributed on an 15*0bdb6530SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*0bdb6530SAndrew Rist# KIND, either express or implied. See the License for the 17*0bdb6530SAndrew Rist# specific language governing permissions and limitations 18*0bdb6530SAndrew Rist# under the License. 19*0bdb6530SAndrew Rist# 20*0bdb6530SAndrew Rist# ************************************************************* 21cdf0e10cSrcweir 22cdf0e10cSrcweirVCL positioning 23cdf0e10cSrcweir 24cdf0e10cSrcweirWindow coordinates are parent relative, with exception of maState fields, they 25cdf0e10cSrcweirhave screen coordinates. 26cdf0e10cSrcweir 27cdf0e10cSrcweirEvery window has a parent window, usually the client area of an existing window, 28cdf0e10cSrcweirotherwise the desktop window. 29cdf0e10cSrcweir 30cdf0e10cSrcweirWhen a window is to be sized/moved, SetPosSize is called. 31cdf0e10cSrcweirSince coordinates are the position/size of client area, we need to calculate 32cdf0e10cSrcweircurrent window frame size/position and map to screen coordinates using the 33cdf0e10cSrcweirowner window position as offset. 34