2016-10-08 16:57:59 +00:00
|
|
|
#ifndef ROFI_SEPARATOR_H
|
|
|
|
#define ROFI_SEPARATOR_H
|
|
|
|
#include <cairo.h>
|
|
|
|
#include "widget.h"
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @defgroup separator separator
|
2016-10-13 07:22:08 +00:00
|
|
|
* @ingroup widget
|
2016-10-08 16:57:59 +00:00
|
|
|
*
|
2016-10-09 07:40:21 +00:00
|
|
|
* Displays a horizontal separator line. The height of the widget determines the line width.
|
|
|
|
*
|
2016-10-08 16:57:59 +00:00
|
|
|
* @{
|
|
|
|
*/
|
2016-10-14 06:47:21 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* Abstract handle to the separator widget internal state.
|
|
|
|
*/
|
2016-10-08 16:57:59 +00:00
|
|
|
typedef struct _separator separator;
|
|
|
|
|
|
|
|
/**
|
2016-10-09 08:07:32 +00:00
|
|
|
* Direction of the separator.
|
|
|
|
*/
|
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
S_HORIZONTAL = 0,
|
|
|
|
S_VERTICAL = 1
|
|
|
|
} separator_type;
|
|
|
|
|
2016-11-01 20:19:13 +00:00
|
|
|
/**
|
|
|
|
* The style of the separator line.
|
|
|
|
*/
|
2016-11-01 07:04:39 +00:00
|
|
|
typedef enum
|
|
|
|
{
|
|
|
|
S_LINE_NONE,
|
|
|
|
S_LINE_SOLID,
|
|
|
|
S_LINE_DASH
|
|
|
|
} separator_line_style;
|
|
|
|
|
2016-10-09 08:07:32 +00:00
|
|
|
/**
|
|
|
|
* @param type The type of separator.
|
|
|
|
* @param sw The thickness of the separator.
|
2016-10-08 16:57:59 +00:00
|
|
|
*
|
|
|
|
* Create a horizontal separator with height h.
|
|
|
|
*
|
|
|
|
* @returns a new separator, free with ::widget_free
|
|
|
|
*/
|
2016-10-09 08:07:32 +00:00
|
|
|
separator *separator_create ( separator_type type, short sw );
|
2016-10-08 16:57:59 +00:00
|
|
|
|
2016-11-01 07:04:39 +00:00
|
|
|
/**
|
|
|
|
* @param sp The separator widget handle.
|
|
|
|
* @param style_str String representation of the style.
|
|
|
|
*
|
|
|
|
* Sets the line style based on the string style_str
|
|
|
|
*/
|
|
|
|
void separator_set_line_style_from_string ( separator *sp, const char *style_str );
|
|
|
|
|
|
|
|
/**
|
|
|
|
* @param sp The separator widget handle.
|
|
|
|
* @param style The new style.
|
|
|
|
*
|
|
|
|
* Sets the line style.
|
|
|
|
*/
|
|
|
|
void separator_set_line_style ( separator *sp, separator_line_style style );
|
2016-10-08 16:57:59 +00:00
|
|
|
/*@}*/
|
|
|
|
#endif // ROFI_SEPARATOR_H
|