SilverScreen Solid Modeler

message_area_configure

message_area_configure

Previous topic Next topic  

message_area_configure

Previous topic Next topic JavaScript is required for the print function  

SilverScreenAPI

 

void message_area_configure ( int lines, int bg_color);

 

int lines;        // number of lines to allocate

int bg_color;     // background color of message area

 



Synopsis

#include "silver.h"

 

The message_area_configure function allocates a number of lines from the SilverScreen view window that may be written to by using the message_area_write function. The lines allocated are subtracted from the top of the current view window.

 

Parameters

lines is an integer value specifying the number of lines to allocate; if it is 0, then the message area will be closed. bg_color is the color used for the background of the message area, and should be in the range of [0, num_colors - 1].

 

Return Value

None

 

Comments

This function will cause a resize of the SilverScreen view window. For developers who operate in “redraw local” mode (as if by cv_set ( REDRAW_LOCAL, 1 )), this resize event will need to be handled.

 

See Also

message_area_write, clear_status

 

Example

The following example creates a 3-line message area and fills it with text. When the user presses the spacebar, the program exits.

C / C++ Code

 

 #include "silver.h"

 

 void main(void)

    {

    message_area_configure( 3, color_light_gray );

 

    message_area_write("This is line 1", 1, color_black);

    message_area_write("This is line 2", 2, color_black);

    message_area_write("This is line 3", 3, color_black);

 

    while ( inchar() != ' ' )

       ;

 

    clear_status();

    }