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
23namespace Inkscape::UI::Widget {
24
26class ColorPalettePreview : public Gtk::DrawingArea
27{
28public:
30 ColorPalettePreview(std::vector<rgb_t> colors);
31
32private:
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:
A Gtk::DrawingArea to preview color palette menu items by showing a small example of the colors.
void draw_func(Cairo::RefPtr< Cairo::Context > const &cr, int, int)
Custom widgets.
Definition desktop.h:126
Color palette widget.