Example #1
0
void
fl_set_tooltip_boxtype( int bt )
{
    create_it( );
    tip->boxtype = bt;
    fl_set_object_boxtype( tip->text, bt );
}
Example #2
0
void
fl_set_tooltip_lalign( int align )
{
    create_it( );
    fl_set_object_lalign( tip->text,
                          tip->lalign = fl_to_inside_lalign( align ) );
}
Example #3
0
void
fl_set_tooltip_font( int style,
                     int size )
{
    create_it( );
    fl_set_object_lstyle( tip->text, tip->fntstyle = style );
    fl_set_object_lsize( tip->text, tip->fntsize = size );
}
Example #4
0
void
fl_set_tooltip_color( FL_COLOR tc,
                      FL_COLOR bc )
{
    create_it( );
    fl_set_object_lcolor( tip->text, tip->textcolor = tc );
    tip->background = bc;
    fl_set_object_color( tip->text, tip->background, tip->background );
}
Example #5
0
File: shm.c Project: coder03/ldd
int main (int argc, char *argv[])
{
    if (argc > 1) {
        if (!strcasecmp ("create", argv[1]))
            create_it ();
        if (!strcasecmp ("remove", argv[1]))
            remove_it ();
        if (!strcasecmp ("receive", argv[1]))
            receive_it ();
        if (!strcasecmp ("send", argv[1]))
            send_it ();
    }
    printf ("Usage: %s  create | remove | receive | send \n", argv[0]);
    exit (-1);
}
Example #6
0
void
fli_show_tooltip( const char * s,
                  int          x,
                  int          y )
{
    int maxw = 0,
        maxh = 0,
        extra;

    if ( ! s )
        return;

    create_it( );

    extra =
           1 + ( tip->boxtype != FL_FLAT_BOX && tip->boxtype != FL_BORDER_BOX );
    fl_get_string_dimension( tip->fntstyle, tip->fntsize,
                             s, strlen( s ), &maxw, &maxh );

    maxw += 7 + extra;
    maxh += 7 + extra;

    if ( maxw > 800 )
        maxw = 800;
    if ( maxh > 800 )
        maxh = 800;

    fl_freeze_form( tip->tooltipper );
    fl_set_form_geometry( tip->tooltipper, x, y, maxw, maxh );
    fl_set_object_label( tip->text, s );
    fl_unfreeze_form( tip->tooltipper );

    if ( ! tip->tooltipper->visible )
        fl_show_form( tip->tooltipper, FL_PLACE_GEOMETRY | FL_FREE_SIZE,
                      FL_NOBORDER, "Tooltip" );

    fl_update_display( 1 );
}