Zrythm v2.0.0-DEV
a highly automated and intuitive digital audio workstation
Loading...
Searching...
No Matches
color_area.h File Reference

Color picker for a channel strip. More...

#include <string>
#include "common/utils/color.h"
#include "gui/backend/gtk_widgets/gtk_wrapper.h"
Include dependency graph for color_area.h:

Go to the source code of this file.

Macros

#define COLOR_AREA_WIDGET_TYPE   (color_area_widget_get_type ())

Typedefs

using ColorAreaWidget

Functions

 G_DECLARE_FINAL_TYPE (ColorAreaWidget, color_area_widget, Z, COLOR_AREA_WIDGET, GtkWidget) enum class ColorAreaType
 Type of ColorAreaWidget this is.
void color_area_widget_setup_generic (ColorAreaWidget *self, Color *color)
 Creates a generic color widget using the given color pointer.
void color_area_widget_setup_track (ColorAreaWidget *self, Track *track)
 Creates a ColorAreaWidget for use inside TrackWidget implementations.
void color_area_widget_set_color (ColorAreaWidget *widget, Color color)
 Changes the color.

Detailed Description

Color picker for a channel strip.

Definition in file color_area.h.

Macro Definition Documentation

◆ COLOR_AREA_WIDGET_TYPE

#define COLOR_AREA_WIDGET_TYPE   (color_area_widget_get_type ())

Definition at line 18 of file color_area.h.

Typedef Documentation

◆ ColorAreaWidget

using ColorAreaWidget
Initial value:
struct _ColorAreaWidget
{
GtkWidget parent_instance;
Color color;
ColorAreaType type;
Track * track;
bool hovered;
GdkTexture * track_icon;
std::string last_track_icon_name;
}

Definition at line 44 of file color_area.h.

Function Documentation

◆ color_area_widget_set_color()

void color_area_widget_set_color ( ColorAreaWidget * widget,
Color color )

Changes the color.

Track types don't need to do this since the color is read directly from the Track.

◆ color_area_widget_setup_generic()

void color_area_widget_setup_generic ( ColorAreaWidget * self,
Color * color )

Creates a generic color widget using the given color pointer.

FIXME currently not used, should be used instead of manually changing the color.

◆ G_DECLARE_FINAL_TYPE()

G_DECLARE_FINAL_TYPE ( ColorAreaWidget ,
color_area_widget ,
Z ,
COLOR_AREA_WIDGET ,
GtkWidget  )

Type of ColorAreaWidget this is.

Generic, only fill with color.

Track, for use in TrackWidget implementations.

It will show an icon and an index inside the color box.

Definition at line 19 of file color_area.h.