/* * Copyright (C) 2020 Linux Studio Plugins Project * (C) 2020 Vladimir Sadovnikov * * This file is part of lsp-plugins * Created on: 15 июн. 2017 г. * * lsp-plugins is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * any later version. * * lsp-plugins is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public License * along with lsp-plugins. If not, see . */ #ifndef UI_TK_TK_H_ #define UI_TK_TK_H_ #include #include #include #include #include #include #include namespace lsp { namespace tk { /** Widget orientation * */ enum orientation_t { O_HORIZONTAL, //!< O_HORIZONTAL horizontal orientation O_VERTICAL //!< O_VERTICAL vertical orientation }; enum scrolling_t { SCROLL_NONE, //!< SCROLL_NONE no scrolling permitted SCROLL_OPTIONAL, //!< SCROLL_OPTIONAL scrolling is permitted but in optional state SCROLL_ALWAYS //!< SCROLL_ALWAYS scrolling is permitted but in optional state }; // List of colors enum color_t { C_UNKNOWN = -1, C_BACKGROUND, C_BACKGROUND2, C_HOLE, C_GLASS, C_RED, C_GREEN, C_BLUE, C_YELLOW, C_CYAN, C_MAGENTA, C_BLACK, C_WHITE, C_LABEL_TEXT, C_BUTTON_FACE, C_BUTTON_TEXT, C_KNOB_CAP, C_KNOB_SCALE, C_LOGO_FACE, C_LOGO_TEXT, C_GRAPH_AXIS, C_GRAPH_MESH, C_GRAPH_MARKER, C_GRAPH_TEXT, C_GRAPH_LINE, C_LEFT_CHANNEL, C_RIGHT_CHANNEL, C_MIDDLE_CHANNEL, C_SIDE_CHANNEL, C_HLINK_TEXT, C_HLINK_HOVER, C_STATUS_OK, C_STATUS_WARN, C_STATUS_ERROR, C_INVALID_INPUT }; /** List of available slots for event processing * */ enum ui_slot_t { LSPSLOT_FOCUS_IN, //!< LSPSLOT_FOCUS_IN Triggered when element takes focus LSPSLOT_FOCUS_OUT, //!< LSPSLOT_FOCUS_IN Triggered when element loses focus LSPSLOT_KEY_DOWN, //!< LSPSLOT_KEY_DOWN Triggered on keyboard key press LSPSLOT_KEY_UP, //!< LSPSLOT_KEY_UP Triggered on keyboard key release LSPSLOT_MOUSE_DOWN, //!< LSPSLOT_MOUSE_DOWN Triggered on mouse button press LSPSLOT_MOUSE_UP, //!< LSPSLOT_MOUSE_UP Triggered on mouse button release LSPSLOT_MOUSE_MOVE, //!< LSPSLOT_MOUSE_MOVE Triggered on mouse pointer motion LSPSLOT_MOUSE_SCROLL, //!< LSPSLOT_MOUSE_SCROLL Triggered on mouse scroll event LSPSLOT_MOUSE_CLICK, //!< LSPSLOT_MOUSE_DBL_CLICK Triggered on mouse click LSPSLOT_MOUSE_DBL_CLICK, //!< LSPSLOT_MOUSE_DBL_CLICK Triggered on mouse double click LSPSLOT_MOUSE_TRI_CLICK, //!< LSPSLOT_MOUSE_TRI_CLICK Triggered on mouse triple click LSPSLOT_MOUSE_IN, //!< LSPSLOT_MOUSE_IN Triggered when mouse first entered widget's area LSPSLOT_MOUSE_OUT, //!< LSPSLOT_MOUSE_OUT Triggered when mouse left widget's area LSPSLOT_SHOW, //!< LSPSLOT_SHOW Triggered when widget becomes visible LSPSLOT_HIDE, //!< LSPSLOT_HIDE Triggered when widget becomes invisible LSPSLOT_SUBMIT, //!< LSPSLOT_SUBMIT Triggered when value(s) stored by the widget is submitted (but can be not changed) LSPSLOT_CHANGE, //!< LSPSLOT_CHANGE Triggered only when value(s) stored by the widget is(are) changed LSPSLOT_DESTROY, //!< LSPSLOT_DESTROY Triggered when widget associated with slot is destroyed LSPSLOT_RESIZE, //!< LSPSLOT_RESIZE Triggered when the geometry of widget has been changed LSPSLOT_RESIZE_PARENT, //!< LSPSLOT_RESIZE_PARENT Triggered when the parent widget has been resized LSPSLOT_CLOSE, //!< LSPSLOT_CLOSE Triggered when the window is requested to close LSPSLOT_HSCROLL, //!< LSPSLOT_HSCROLL Triggered when the horizontal scrolling is applied LSPSLOT_VSCROLL, //!< LSPSLOT_VSCROLL Triggered when the vertical scrolling is applied LSPSLOT_ACTIVATE, //!< LSPSLOT_ACTIVATE Triggered some user-interaction LSPSLOT_DRAW3D, //!< LSPSLOT_DRAW3D Triggered when a 3D-rendering is required LSPSLOT_DRAG_REQUEST, //!< LSPSLOT_DRAG_REQUEST Triggered when a drag request is pending on the widget LSPSLOT_BEFORE_POPUP, //!< LSPSLOT_BEFORE_POPUP Triggered before pop-up element is going to be shown LSPSLOT_POPUP, //!< LSPSLOT_POPUP Triggered after pop-up element has been shown }; typedef struct w_class_t { const char *name; const w_class_t *parent; } w_class_t; enum ui_property_type_t { PT_INT, // Integer property PT_FLOAT, // Floating-point property PT_BOOL, // Boolean property PT_STRING, // String (text) property PT_UNKNOWN = -1 }; /** * Atom identifier */ typedef ssize_t ui_atom_t; /** Get color name by it's identifier * * @param color color identifier * @return color name */ const char *color_name(color_t color); /** Get color identifier by it's name * * @param name color name * @return color identifier */ color_t color_id(const char *name); // Collaborate with ::lsp::ws namespace using namespace ::lsp::ws; } } // System objects #include #include #include #include #include #include #include #include #include // Utilitary objects #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Widget basics #include #include #include // Basic widgets #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Dialogs #include #include // Advanced widgets #include #include #include #include #include // Grapic widgets #include #include #include #include #include #include #include #include // 3D rendering #include #include #include #include #endif /* UI_TK_TK_H_ */