/** Copyright 2010 Haiku, Inc. All rights reserved.* Distributed under the terms of the MIT License.** Authors:* Alex Wilson, yourpalal2@gmail.com*//*!\page interface_intro Introduction to the Interface Kit\ingroup interface\section Interface OverviewThe Interface Kit holds all the classes you'll need to develop a GUI.Building on the messaging facilities provided by the Application Kit,the Interface Kit can be used to create a responsive and attractivegraphical user interface.The most important class in the Interface Kit is the BView class, whichhandles drawing and user interaction. Pointer and keyboard events areprocessed in this class.Another important class is the BWindow class, which holds BViews and makesthem visible to the user. The BWindow class also handles BView focusingand BMessage dispatching, among other things.A new addition Haiku has added over the BeOS API is the Layout API, whichis based around the BLayoutItem and BLayout classes. These classes willtake care of making sure all your GUI widgets end up where you want them,with enough space to be useful. You can start learning the Layout APIby reading the \ref layout_intro.\section coordinatespaces Coordinate spacesAll APIs using coordinates (such as BRect or BPoint) refer toa specific space where these coordinates are interpreted. BView andBWindow provide various conversion function to translate coordinatesbetween different spaces, as needed, or provide separate methods such asBView Bounds() and Frame(), returning results in different spaces as needed.The initial coordinate space, from which all others are derived, is thescreen space. Its origin is at the center of the screen's top-left pixel.Coordinates can be converted between this and a specific window or viewspace using the ConvertToScreen and ConvertFromScreen methods ofthe corresponding object.Each BWindow has its own coordinate space. Its origin is at the center ofthe top-left pixel of the window client area (just inside the window border).Root level views added to the window have their frame rectangle defined inthis space.Each BView also gets its own coordinate space. The origin is initially at thetop left of the view, but this can be changed by scrolling the view(programatically using ScrollBy or ScrollTo, or by the user acting on a scrollbar).Additionally, each BView also has a drawing space. This is further transformedfrom the BView coordinate space by calls to SetOrigin, SetScale, SetTransform,ScaleBy, RotateBy, and TranslateBy. The effects of the first two of thesemethods are independant from the other four, and it's not recommended to mixthe two types of transformations in the same BView. Note that this is the only spacethat can be scaled and rotated, and translated by non-integer units. All othercoordinate spaces are only translations of the screen one and remain aligned on pixels.All drawing operations in a BView use coordinates specified in the drawing space.However, the update rect passed to the Draw method (or passed to the Invalidatemethod) is in the BView base coordinate space. Conversion between the two canbe done using the affine transform returned by BView::TransformTo.*/