Methods of the document window

Previous Top Next

Creation of an object instance the Document window is carried out automatically by object the Application. The object of Document window does not generate events, therefore methods of the corresponding class (TPanWindow) should not be overridden. Class TPanWindow is only used to control the document window. Events associated with a window are sent to the object of Command Handler, if it is created.

TPanWindow class methods can be divided into several groups according to their purpose::

- request of the help information;

- scaling and recalculation of coordinates;

- displaying the execution of the streaming task;

- request and processing of the information about a map object;

- managing the display of comments;

- window interface of a digital map;

Help information can be requested by the following methods:

GetApplicationName - to request the application's name,

GetIniName - to request a file name "ini" of  application,

GetMapIniName - to request a file name "ini" of a map,

GetHelpName - to request the help file name of the application (*.CHM),

GetLanguage - to request a code of current language of application's dialogues,

GetPanelState - to request the status of toolbar (it is displayed

                                   or not),

GetPathShell - to request the path to the application's directory,

GetUserName - to request the user name,

GetDocPath - to request a file name of the document.

Methods of requesting an application name, names of files "chm" and "ini" can return the values that are set from a class of application in corresponding variables of TPanWindow class.

Scaling of the map image and recalculation of coordinates can be executed by the following methods:

ChangeScale - to change current scale of the image,

Client2Picture - to convert coordinates of point of client area

                                  into image coordinates,

Picture2Client - to convert the coordinates of the map's image point

                                  into the coordinates of the window client area,

PlaneToClient - the coordinate transformation of a point in the area (meters)

                                   to the coordinates of the client area,

SetPicturePoint - to set the coordinates of the upper left corner of the map window,

GetPicturePoint - to request the coordinates of the upper left corner of the map window,

Display of percent of  performing the streaming task in an information ruler of GIS Panorama is implemented by the following methods:

CreateProgress - to start a ruler with percent of process execution and

                                   name;

SetProgressPercent - to change percent of process execution;

DeleteProgress - to clean a ruler of process execution.

Request and processing of information about object of the map is performed by the following methods:

SetSelectObject - to set the selected object, the selected object will be automatically be highlighted on the map;

IsObjectSelected - to request the identifier of selected object;

ClearSelect - to undo an object selection;

ViewObject - to display a map area on which the specified object is located, in a certain fragment of the window;

ViewPlanePoint - to display a map area on which the specified point is located, (in meters) in the window centre;

SetViewSelect - to set the selection of objects on the map by generalized criteria of search/selection of objects.

Managing the display of comments is carried out by the following methods:

SetMessage - to display message in an information line of GIS Panorama;

SetWindowTitle - to display the message in the header of a map window;

ClearWindowTitl - to delete the message from window header;

ViewHelp - to display the specified help section from the "CHM" file of application;

PressButton - to press the button for the specified command on all panels where it is;

ReleaseButton - to release the button for the specified command.

Window interface of digital map is implemented by the following methods:

GetHandle - to request the handle (identifier) (HWND) of map window;

GetParentHandle - to request the handle (HWND) of the parent map window;

GetMainHandle - to request the handle (HWND) of the main application window;

GetCursorPos - to request a cursor position in the window;

GetClientRect - to request the size of client area of a map window;

GetMainClientRec - to request the size of client area of the main application window;

ScreenToClient - recalculation of screen coordinates;

SendMessage - to send the message to a map window with execution waiting;

PostMessage - to send a message to a map window of a map without waiting;

MainMessage - to send the message to the main window with execution waiting;

Invalidate - to send a message to a map window for redrawing the window;

InvalidateRect - to send a message to a map window for redrawing the window fragment;

InvalidateRectPlane - to send a message to a map window for redrawing the window fragment, specified by rectangular coordinates (in meters);

UpdateWindow - to redraw a map window immediately.

Description of TPanWindow class is contained in the file PANWIN.H, the implementation - in the file PANTASK.CPP. Files are located in the folder \SDK\PANTASK of examples of application development in GIS "Panorama" 12.