Commit Graph

573 Commits

Author SHA1 Message Date
Robin Gareus
5ef2d04cd8 Remove unused size_request-for_text helpers 2022-09-20 03:33:12 +02:00
Paul Davis
a2e4897a49 move color utility functions from ARDOUR_UI_UTILS to Gtkmm2ext namespace (libs) 2022-08-10 21:11:46 -06:00
Paul Davis
e0d33bb726 cairowidget: add supplementary set_source_rgb_a() method that uses the uint32 Color type 2022-08-10 18:15:25 -06:00
Robin Gareus
71ee12af6a Add API to format keyboard modifiers for tooltips 2022-06-21 22:11:49 +02:00
Robin Gareus
5b03bf72fa NO-OP: code style 2022-06-21 22:11:08 +02:00
Robin Gareus
af38528174 Physical modifier abstraction is constant 2022-06-21 22:09:54 +02:00
Robin Gareus
8a5fc65df4 Expose newly added semantic modifiers 2022-06-21 21:38:37 +02:00
Robin Gareus
3266b1acb0 Add API to query currently held modifiers keys 2022-06-21 21:37:14 +02:00
Robin Gareus
f1eb45e129 NO-OP: clang format 2022-06-21 21:37:08 +02:00
Ben Loftis
e557245bf7 implement group_override_modifier() (lib part)
Consistently use Tertiary for Group Override on all platforms (and be consistent about it)

Consistently use Primary-mod for Momentary on all platforms (partially reverts 47932f)
Primary modifier is used for fine-adjust on knobs and sliders, with no analogous operation on switches.
2022-06-21 13:01:30 -05:00
Ben Loftis
fd9a76073b modifiers: add momentary_push_name (for tooltips) 2022-06-17 11:07:58 -05:00
Ben Loftis
12e703414d modifiers: make a new abstraction for momentary-click, instead of button_2 (lib part)
is_button2_event()  was used to detect the user's desire for a
  momentary-click on some buttons (mute, solo, mixer scenes)

is_momentary_push_event() disambiguates this action from is_button2_event()

for the special case of momentary, we can drop the workarounds for
  the lack of middle-mouse buttons on Mac, and instead just use
  shift+left-click on all platforms.
2022-06-17 11:07:49 -05:00
Ben Loftis
71833911a4 modifiers: publish button2_name (for use in tooltips) 2022-06-17 10:52:06 -05:00
Paul Davis
c0b1f0e63c fix buglet in RAII mgmt of Bindings::_drags_active 2022-04-18 12:21:57 -06:00
Paul Davis
729f930974 bindings: add a mechanism to prevent binding activation during drag 2022-04-18 11:38:21 -06:00
Robin Gareus
f9d80c32d6 Allow to destroy Widgets when removing them from a container
This is useful when the container uses manage()d Widgets,
which are otherwise not destroyed.
2022-04-14 16:35:02 +02:00
Paul Davis
7bf89ce109 Constification: make Stateful::get_state() const, with all other required const-ness added (libs) 2022-04-06 21:56:59 -06:00
Robin Gareus
50abcc74b5 Replace Glib::Threads with PBD::Thread (2/2) 2022-03-01 01:34:35 +01:00
Robin Gareus
6dc66ea78f Prioritize self-deletion
This addresses the issue described in 83719fba1a.
First process all queued self_delete() requests before scheduling
Editor::redisplay_track_views() which uses PRIORITY_DEFAULT.
2022-01-29 05:17:00 +01:00
Robin Gareus
036ad841bf Remove using namespace Gtk; from headers
This causes issues if the header is included early on
in particular a conflict with gdkx.h
The reference to ‘Window’ is ambiguous `Gtk::Window` vs [X11]Window.
2022-01-26 22:32:28 +01:00
Robin Gareus
62a098811c Allow DnDTreeView drag w/o object reference 2022-01-19 17:13:51 +01:00
Robin Gareus
1078dc7eda DnD-TV: Allow to specify TargetFlags 2022-01-10 20:40:46 +01:00
Paul Davis
e057088195 remove unused, empty glib event source/callback code (was from an experiment during nutempo2 development) 2021-09-04 07:39:27 -06:00
Paul Davis
772d70ae4c use glib event callback to invoke per-thread code every time the GUI event loop does stuff 2021-08-13 12:51:29 -06:00
Paul Davis
783e33dc0c new implementations for Gtkmm2ext::HSV::{darker,lighter} that follow "common sense" rather than Google.
HSV::shade() still follows the google model
2021-08-13 12:51:26 -06:00
Paul Davis
fc25e074ac add Gtkmm2ext::random_color() 2021-08-13 12:51:25 -06:00
Paul Davis
6db261d566 libgtkmm2ext: modify Keyboard handling of close-current-dialog
1) if there is no current dialog, allow some other window to handle the keyboard event
2) make the binding (which is hard coded) visible as static members of Keyboard
2021-04-26 10:48:20 -06:00
Robin Gareus
70ad205bc1 Separate static widget theme into abstract class
This allow the style to be used in classed that are not
directly derived from Ardour's CairoWidget, notably
container widgets or plugin UIs.
2021-01-26 23:37:54 +01:00
Robin Gareus
e4e94e77c9 Transmitter::Debug implementation 1/2
This also sorts switch() and listen_to() statements in order
of severity: debug, info, warning, error, fatal, throw.
2020-10-13 21:58:26 +02:00
Robin Gareus
85034d0bca Pass through DnDTV signal_drag_motion event 2020-06-25 02:24:02 +02:00
Paul Davis
7ac9c7e88a fix mask used to extract keycode from KeyboardKey object
Previous 16 bit mask would do the wrong thing if the keycode was > 65536,
which is not often true but is certainly a valid value (and seen on some
platforms)
2020-05-18 13:33:54 -06:00
Robin Gareus
ab6e274613 Ignore idempotent set_name() calls
These calls are expensive, particularly for ArdourButton, that
triggers a re-layout.
2020-05-12 15:37:23 +02:00
Paul Davis
b258ad792e force provision of "menu-name" for all WindowProxy objects, and thus Tabbables
Actions for hide/show/attach/detach tabbables use hard-coded names which are not
translated. Using Tabbable/WindowProxy::name() to lookup the action will fail,
since the name can be translated. This changes just removes the option to not
provide a menu-name when creating these objects, and uses the name menu-name
when looking up an action by name
2020-05-01 14:33:47 -06:00
Paul Davis
2084a39168 some tweaks to Bindings API to allow ::is_bound() to indicate the action path for an existing binding
Plus some minor comment additions and cleanups
2020-04-12 08:57:59 -06:00
Robin Gareus
fa0a7d6739 Allow to limit error dump
This is in preparation of displaying verbose errors to the user.
2020-02-28 07:26:13 +01:00
Robin Gareus
563a8b15e0 Revert to use an image surface for CairoWidgets
This partially reverts 2edbda2526 and is a follow up to 0b266a54f,
to fix performance issues with MS Windows graphics performance.
2020-01-08 04:24:51 +01:00
Robin Gareus
2edbda2526 Replace explicit image-surface with cairo pattern/group
For MacOS/X this is equivalent, rendering happens using a
CGBitmapContext + image-surface. Windows and Linux needs profiling
for respective equivalent surfaces.
2019-12-27 19:35:02 +01:00
Robin Gareus
c3ab63a2ea Allow for per-widget image-surface backing
This is an intermediate commit, before replacing image surfaces with
cairo pattern groups.

The eventual goal is to reduce flickering and/or use
CPU + bitblt for specific widgets instead of cairo
graphics-cards accel.

This also removes excessive calls to getenv() for every rendering
operation.
2019-12-27 19:34:56 +01:00
Paul Davis
6f4e838a58 add a signal to Gtkmm2ext::Keyboard to allow (possible) handling of close-current-dialog 2019-11-06 16:25:30 -07:00
Paul Davis
dd29e9b0e9 remove unnecessary template methods (replicated in libs/gtkmm2ext/doi.h 2019-10-10 16:52:00 -06:00
Robin Gareus
cec5ce8f45 Update canvas/UI lib GPL boilerplate and (C) from git log 2019-08-03 15:53:17 +02:00
Johannes Mueller
822f55f4af Provide ActionModel::build_custom_action_combo() for Control Protcols
to consolidate code that's identical in several control protocols.
2019-04-20 22:12:52 +02:00
Johannes Mueller
de876acc8b Provide a function to fill a Gtk::ComboBox with all available actions 2019-04-20 15:25:32 +02:00
Johannes Mueller
b141d17274 Provide an API to get all available actions by one singleton class
The singleton ActionModel provides a Gtk::Treestore of all actions known to
ardour.

To be used for example by surface control editors to implement action bindings.
2019-04-20 15:25:32 +02:00
Robin Gareus
2a8bda01b1 NO-OP: whitespace 2019-04-11 02:32:45 +02:00
Robin Gareus
01024e2b4c Add API to render a reflection
This is to be used sparingly because the pattern is dynamically
created every time. Mainly for the benefit of some Mixbus
widgets -- compared to ArdourButton::convex_pattern
2019-04-11 02:06:32 +02:00
Paul Davis
ed97a290db make ::ardour_action_name() private to Bindings, because nothing else uses it and it semi-exposes the <Actions> nonsense 2019-03-20 11:12:06 -07:00
Ben Loftis
957393c435 Compiler fix for 201110. 2019-03-19 11:24:26 -05:00
Paul Davis
21110444c1 use a new unhandled (thus far) exception rather than ::abort() when an action is undefined 2019-03-19 08:29:30 -07:00
Paul Davis
f974ff594a additional API to make it nicer to get an existing action group 2019-01-13 11:59:18 -06:00