SilverScreen Solid Modeler

text_window_open

text_window_open

Previous topic Next topic  

text_window_open

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

int text_window_open ( char *name, int lpix, int tpix,

                      int wchar, int hchar, int resize )

 

char *name;       // a string containing the name of the text window

int   lpix;       // left edge of new text window

int   tpix;       // top edge of new text window

int   wchar;      // width, in characters, of new text window

int   hchar;      // height, in characters, of new text window

int   resize;     // controls whether text window may be resized

 

 




Synopsis

#include "silver.h"

 

The text_window_open function opens a text window that is separate from the main application window used to display SilverScreen drawings. This window is a popup window that is displayed over the SilverScreen main window. It may be moved around on the Windows, screen, and, depending on the setting of the resize argument, may also be resized by the user.

 

 

Parameters

name is the name of the text window, displayed in its title bar. lpix and tpix specify the top-left corner of the window on the Windows screen; wchar and hchar specify the initial window width in characters. resize is a flag that specifies whether the window may be resized or not: 0 if not, non-zero otherwise.

 

 

Return Value

If the window cannot be opened, then 0 is returned; otherwise 1.

 

 

Comments

A window opened in this fashion may use the text drawing functions (wstring, wchar, wcolor, etc.) to render text on its surface. Refresh for the main application window is handled by the system; refresh for the text window must be handled by the user program; i.e. they must handle C_REDRAW and C_RESIZE messages returned by inchar.

 

The text editor may be invoked after calling text_window_open. In this case, the text editor will display in the text window.

 

 

See Also

text_window_close