Agar Logo

Agar 1.7 Manual

(Printable Version)
AG_Titlebar(3)

SYNOPSIS

#include <agar/core.h>
#include <agar/gui.h>

DESCRIPTION

ScreenshotThe AG_Titlebar widget is Agar's general-purpose window titlebar. It is derived from AG_Box(3), it packs an AG_Label(3) and optional AG_Button(3) controls for closing, minimizing and maximizing the window.

INHERITANCE HIERARCHY

AG_Object(3)-> AG_Widget(3)-> AG_Box(3)-> AG_Titlebar.

INITIALIZATION

Note: Unless the AG_WINDOW_NOTITLE is used, a AG_Titlebar is attached by default to newly created windows (see AG_Window(3)). This interface is therefore rarely used directly.


AG_Titlebar * AG_TitlebarNew (AG_Widget *parent, Uint flags)


The AG_TitlebarNew() function allocates, initializes, and attaches a new AG_Titlebar widget. Available flags options include:
AG_TITLEBAR_NO_CLOSEDisable the close control button.
AG_TITLEBAR_NO_MINIMIZEDisable the minimize control button.
AG_TITLEBAR_NO_MAXIMIZEDisable the maximize control button.

EVENTS

The AG_Titlebar widget generates the following events:
window-close (void)
The close button has been triggered.

STRUCTURE DATA

For the AG_Titlebar object:
AG_Window *win Back pointer to the attached AG_Window(3), if any.
AG_Label *label Pointer to the AG_Label(3) displaying the window caption.

SEE ALSO


HISTORY

The AG_Titlebar widget first appeared in Agar 1.0.

Csoft.net ElectronTubeStore