Inkscape
Vector Graphics Editor
Loading...
Searching...
No Matches
color-palette-preview.h
Go to the documentation of this file.
1
// SPDX-License-Identifier: GPL-2.0-or-later
5
/*
6
* Authors:
7
* Michael Kowalski
8
* Daniel Boles <dboles.src+inkscape@gmail.com>
9
*
10
* Copyright (C) 2021 Michael Kowalski
11
* Copyright (C) 2023 Daniel Boles
12
* Released under GNU GPL v2+, read the file 'COPYING' for more information.
13
*/
14
15
#ifndef SEEN_UI_WIDGET_COLOR_PALETTE_PREVIEW_H
16
#define SEEN_UI_WIDGET_COLOR_PALETTE_PREVIEW_H
17
18
#include <vector>
19
#include <gtkmm/drawingarea.h>
20
21
#include "
ui/widget/palette_t.h
"
22
23
namespace
Inkscape::UI::Widget
{
24
26
class
ColorPalettePreview
:
public
Gtk::DrawingArea
27
{
28
public
:
30
ColorPalettePreview
(std::vector<rgb_t> colors);
31
32
private
:
33
std::vector<rgb_t>
_colors
;
34
35
void
draw_func
(Cairo::RefPtr<Cairo::Context>
const
&cr,
int
,
int
);
36
};
37
38
}
// namespace Inkscape::UI::Widget
39
40
#endif
// SEEN_UI_WIDGET_COLOR_PALETTE_PREVIEW_H
41
42
/*
43
Local Variables:
44
mode:c++
45
c-file-style:"stroustrup"
46
c-file-offsets:((innamespace . 0)(inline-open . 0)(case-label . +))
47
indent-tabs-mode:nil
48
fill-column:99
49
End:
50
*/
51
// vim:filetype=cpp:expandtab:shiftwidth=4:tabstop=8:softtabstop=4:fileencoding=utf-8:textwidth=99:
Inkscape::UI::Widget::ColorPalettePreview
A Gtk::DrawingArea to preview color palette menu items by showing a small example of the colors.
Definition
color-palette-preview.h:27
Inkscape::UI::Widget::ColorPalettePreview::_colors
std::vector< rgb_t > _colors
Definition
color-palette-preview.h:33
Inkscape::UI::Widget::ColorPalettePreview::draw_func
void draw_func(Cairo::RefPtr< Cairo::Context > const &cr, int, int)
Definition
color-palette-preview.cpp:35
Inkscape::UI::Widget
Custom widgets.
Definition
desktop.h:126
palette_t.h
Color palette widget.
src
ui
widget
color-palette-preview.h
Generated on Sun Jul 13 2025 04:02:22 for Inkscape by
1.9.8