Compare commits
No commits in common. "dd23aadd62dd3947706cadbb6eeb2159edfb23d1" and "90d45ac4289521a315bad0d4b859d77ae6f323a9" have entirely different histories.
dd23aadd62
...
90d45ac428
@ -66,7 +66,7 @@ using namespace Gtk;
|
||||
using namespace std;
|
||||
|
||||
TriggerPage::TriggerPage ()
|
||||
: Tabbable (_("Cues"), X_("trigger"), NULL, true, Tabbable::PaneLayout (Tabbable::PaneRight | Tabbable::PaneBottom))
|
||||
: Tabbable (_("Cues"), X_("trigger"))
|
||||
, _cue_area_frame (0.5, 0, 1.0, 0)
|
||||
, _cue_box (16, 16 * TriggerBox::default_triggers_per_box)
|
||||
, _master_widget (16, 16)
|
||||
@ -151,12 +151,19 @@ TriggerPage::TriggerPage ()
|
||||
table->show_all ();
|
||||
|
||||
_parameter_box.pack_start (*table);
|
||||
_parameter_box.show ();
|
||||
_parameter_box.set_no_show_all ();
|
||||
|
||||
/* Top-level Layout */
|
||||
content_app_bar.add (_application_bar);
|
||||
content_innermost_hbox.add (_strip_group_box);
|
||||
content_att_bottom.add (_parameter_box);
|
||||
content_innermost_hbox.add (_pane);
|
||||
|
||||
_pane.add (_strip_group_box);
|
||||
/* we cannot `content_midlevel_vbox.remove(_content_att_bottom)` and add it to the _pane
|
||||
* because visibility updates are not propagated upward, and the pane will not collapse
|
||||
* when the _parameter_box is hidden
|
||||
*/
|
||||
_pane.add (_parameter_box);
|
||||
|
||||
content_att_right.add (_sidebar_notebook);
|
||||
|
||||
/* Show all */
|
||||
@ -217,9 +224,9 @@ TriggerPage::showhide_att_bottom (bool yn)
|
||||
_show_bottom_pane = yn;
|
||||
|
||||
if (!_show_bottom_pane) {
|
||||
Tabbable::showhide_att_bottom (false);
|
||||
_parameter_box.hide ();
|
||||
} else if (!Editor::instance ().get_selection ().triggers.empty ()) {
|
||||
Tabbable::showhide_att_bottom (true);
|
||||
_parameter_box.show ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -438,7 +445,7 @@ TriggerPage::rec_enable_changed (Trigger const * trigger)
|
||||
_midi_trig_box.hide ();
|
||||
_midi_editor->viewport().hide ();
|
||||
|
||||
Tabbable::showhide_att_bottom (false);
|
||||
_parameter_box.hide ();
|
||||
|
||||
TriggerBox& box = trigger->box();
|
||||
TriggerReference ref (trigger->boxptr(), trigger->index());
|
||||
@ -462,7 +469,7 @@ TriggerPage::rec_enable_changed (Trigger const * trigger)
|
||||
}
|
||||
|
||||
if (_show_bottom_pane) {
|
||||
Tabbable::showhide_att_bottom (true);
|
||||
_parameter_box.show ();
|
||||
}
|
||||
}
|
||||
|
||||
@ -478,7 +485,7 @@ TriggerPage::selection_changed ()
|
||||
_midi_trig_box.hide ();
|
||||
_midi_editor->viewport().hide ();
|
||||
|
||||
Tabbable::showhide_att_bottom (false);
|
||||
_parameter_box.hide ();
|
||||
|
||||
if (!selection.triggers.empty ()) {
|
||||
TriggerSelection ts = selection.triggers;
|
||||
@ -504,7 +511,7 @@ TriggerPage::selection_changed ()
|
||||
}
|
||||
|
||||
if (_show_bottom_pane) {
|
||||
Tabbable::showhide_att_bottom (true);
|
||||
_parameter_box.show ();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -113,6 +113,7 @@ private:
|
||||
|
||||
Gtkmm2ext::Bindings* bindings;
|
||||
|
||||
ArdourWidgets::VPane _pane;
|
||||
Gtk::HBox _strip_group_box;
|
||||
Gtk::ScrolledWindow _strip_scroller;
|
||||
Gtk::HBox _strip_packer;
|
||||
|
@ -106,24 +106,12 @@ public:
|
||||
#if defined(_MSC_VER) /* && (_MSC_VER < 1900)
|
||||
* Regarding the note (below) it was initially
|
||||
* thought that this got fixed in VS2015 - but
|
||||
* in fact it's still faulty (JE - Feb 2021).
|
||||
* 2024-09-03 update: Faulty compile up to
|
||||
* VS2022 17.4. From there it compiles but does
|
||||
* not link with the exception of the arm64
|
||||
* platform. This quirk is actually a bug that
|
||||
* Microsoft seems to have failed to
|
||||
* acknowledge as such for years judging from
|
||||
* web search results about MSVC's std::map,
|
||||
* and have not even fixed correctly when they
|
||||
* tried.
|
||||
*/
|
||||
* in fact it's still faulty (JE - Feb 2021) */
|
||||
/* Use the older (heap based) mapping for early versions of MSVC.
|
||||
* In fact it might be safer to use this for all MSVC builds. It
|
||||
* was thought that this was related to issues with
|
||||
* boost::aligned_storage, but actually it seems to be that there
|
||||
* are bugs in the std::map implementation of MSVC that are being
|
||||
* triggered, messing with the copy constructor of
|
||||
* PBD::StackAllocator.
|
||||
* In fact it might be safer to use this for all MSVC builds - as
|
||||
* our StackAllocator class depends on 'boost::aligned_storage'
|
||||
* which is known to be troublesome with Visual C++ :-
|
||||
* https://www.boost.org/doc/libs/1_65_0/libs/type_traits/doc/html/boost_typetraits/reference/aligned_storage.html
|
||||
*/
|
||||
typedef std::map<uint32_t, uint32_t> TypeMapping;
|
||||
typedef std::map<DataType, TypeMapping> Mappings;
|
||||
|
@ -26,7 +26,6 @@
|
||||
#include "evoral/Event.h"
|
||||
|
||||
using namespace std;
|
||||
using namespace std::placeholders;
|
||||
|
||||
namespace Evoral {
|
||||
|
||||
|
@ -19,6 +19,7 @@
|
||||
#ifndef PBD_STACK_ALLOCATOR_H
|
||||
#define PBD_STACK_ALLOCATOR_H
|
||||
|
||||
#include <boost/type_traits/aligned_storage.hpp>
|
||||
#include <limits>
|
||||
|
||||
#include "pbd/libpbd_visibility.h"
|
||||
@ -60,22 +61,22 @@ public:
|
||||
};
|
||||
|
||||
StackAllocator ()
|
||||
: _ptr (_buf.data())
|
||||
: _ptr ((pointer)&_buf)
|
||||
{ }
|
||||
|
||||
StackAllocator (const StackAllocator&)
|
||||
: StackAllocator ()
|
||||
: _ptr ((pointer)&_buf)
|
||||
{ }
|
||||
|
||||
template <typename U, size_t other_capacity>
|
||||
StackAllocator (const StackAllocator<U, other_capacity>&)
|
||||
: StackAllocator ()
|
||||
: _ptr ((pointer)&_buf)
|
||||
{ }
|
||||
|
||||
/* inspired by http://howardhinnant.github.io/stack_alloc.h */
|
||||
pointer allocate (size_type n, void* hint = 0)
|
||||
{
|
||||
if (_buf.data() + stack_capacity >= _ptr + n) {
|
||||
if ((pointer)&_buf + stack_capacity >= _ptr + n) {
|
||||
DEBUG_STACK_ALLOC ("Allocate %ld item(s) of size %zu on the stack\n", n, sizeof (T));
|
||||
pointer rv = _ptr;
|
||||
_ptr += n;
|
||||
@ -107,12 +108,12 @@ public:
|
||||
|
||||
bool operator== (StackAllocator const& a) const
|
||||
{
|
||||
return _buf.data() == a._buf.data();
|
||||
return &_buf == &a._buf;
|
||||
}
|
||||
|
||||
bool operator!= (StackAllocator const& a) const
|
||||
{
|
||||
return _buf.data() != a._buf.data();
|
||||
return &_buf != &a._buf;
|
||||
}
|
||||
|
||||
template <class U>
|
||||
@ -146,10 +147,12 @@ private:
|
||||
|
||||
bool pointer_in_buffer (pointer const p)
|
||||
{
|
||||
return (_buf.data() <= p && p < _buf.data() + stack_capacity);
|
||||
return ((pointer const)&_buf <= p && p < (pointer const)&_buf + stack_capacity);
|
||||
}
|
||||
|
||||
alignas(16) std::array<value_type, stack_capacity> _buf;
|
||||
typedef typename boost::aligned_storage<sizeof (T) * stack_capacity, 16>::type align_t;
|
||||
|
||||
align_t _buf;
|
||||
pointer _ptr;
|
||||
};
|
||||
|
||||
|
@ -42,8 +42,9 @@ void
|
||||
Receiver::listen_to (Transmitter &transmitter)
|
||||
|
||||
{
|
||||
/* odd syntax here because std's placeholders (_1, _2) are in an
|
||||
anonymous namespace which causes ambiguity with sigc++
|
||||
/* odd syntax here because boost's placeholders (_1, _2) are in an
|
||||
anonymous namespace which causes ambiguity with sigc++ (and will also
|
||||
do so with std::placeholder in the C++11 future
|
||||
*/
|
||||
transmitter.sender().connect_same_thread (connections, std::bind (&Receiver::receive, this, std::placeholders::_1, std::placeholders::_2));
|
||||
|
||||
|
@ -1144,7 +1144,6 @@ MackieControlProtocol::latch_press (MACKIE_NAMESPACE::Button&)
|
||||
MACKIE_NAMESPACE::LedState
|
||||
MackieControlProtocol::latch_release (MACKIE_NAMESPACE::Button&)
|
||||
{
|
||||
set_automation_state (ARDOUR::Latch);
|
||||
return none;
|
||||
}
|
||||
MACKIE_NAMESPACE::LedState
|
||||
|
@ -17,6 +17,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "boost/lambda/lambda.hpp"
|
||||
|
||||
#include "pbd/control_math.h"
|
||||
|
||||
#include "ardour/track.h"
|
||||
|
@ -17,6 +17,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "boost/lambda/lambda.hpp"
|
||||
|
||||
#include "pbd/control_math.h"
|
||||
|
||||
#include "ardour/amp.h"
|
||||
|
@ -19,6 +19,8 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "boost/lambda/lambda.hpp"
|
||||
|
||||
#include "pbd/control_math.h"
|
||||
#include <glibmm.h>
|
||||
|
||||
|
@ -19,6 +19,8 @@
|
||||
*/
|
||||
|
||||
#include <vector>
|
||||
#include "boost/lambda/lambda.hpp"
|
||||
|
||||
#include "pbd/control_math.h"
|
||||
|
||||
#include "ardour/session.h"
|
||||
|
@ -81,7 +81,7 @@ Tabbable::default_layout ()
|
||||
|
||||
left_attachment_button.set_sensitive (0 != (_panelayout & (PaneLeft | AttLeft)));
|
||||
right_attachment_button.set_sensitive (0 != (_panelayout & PaneRight));
|
||||
bottom_attachment_button.set_sensitive (0 != (_panelayout & (PaneBottom | AttBottom)));
|
||||
bottom_attachment_button.set_sensitive (0 != (_panelayout & AttBottom));
|
||||
|
||||
content_attachment_hbox.set_border_width(3);
|
||||
content_attachment_hbox.set_spacing(3);
|
||||
@ -106,25 +106,18 @@ Tabbable::default_layout ()
|
||||
#endif
|
||||
|
||||
|
||||
Widget* midlevel = 0 == (_panelayout & PaneBottom) ? (Widget*)&content_midlevel_vbox : (Widget*)&content_midlevel_vpane;
|
||||
|
||||
if (_panelayout & PaneLeft) {
|
||||
_content_vbox.pack_start (content_left_pane, true, true);
|
||||
content_left_pane.add (content_att_left);
|
||||
content_left_pane.add (*midlevel);
|
||||
content_left_pane.add (content_midlevel_vbox);
|
||||
} else {
|
||||
_content_vbox.pack_start (content_hbox, true, true);
|
||||
content_hbox.pack_start (content_att_left, false, false);
|
||||
content_hbox.pack_start (*midlevel, true, true);
|
||||
content_hbox.pack_start (content_midlevel_vbox, true, true);
|
||||
}
|
||||
|
||||
if (_panelayout & PaneBottom) {
|
||||
content_midlevel_vpane.add (content_right_pane);
|
||||
content_midlevel_vpane.add (content_att_bottom);
|
||||
} else {
|
||||
content_midlevel_vbox.pack_start (content_right_pane, true, true);
|
||||
content_midlevel_vbox.pack_start (content_att_bottom, false, false);
|
||||
}
|
||||
content_midlevel_vbox.pack_start (content_right_pane, true, true);
|
||||
content_midlevel_vbox.pack_start (content_att_bottom, false, false);
|
||||
|
||||
content_right_pane.add (content_inner_vbox);
|
||||
|
||||
@ -148,12 +141,6 @@ Tabbable::default_layout ()
|
||||
content_left_pane.set_check_divider_position (true);
|
||||
content_left_pane.set_divider (0, 0.15);
|
||||
|
||||
if (_panelayout & PaneBottom) {
|
||||
content_midlevel_vpane.set_child_minsize (content_right_pane, 300);
|
||||
}
|
||||
content_midlevel_vpane.set_check_divider_position (true);
|
||||
content_midlevel_vpane.set_divider (0, 0.85);
|
||||
|
||||
_content_vbox.show_all();
|
||||
}
|
||||
|
||||
@ -446,15 +433,8 @@ Tabbable::get_state() const
|
||||
|
||||
node.set_property (X_("tabbed"), tabbed());
|
||||
|
||||
if (_panelayout & PaneRight) {
|
||||
node.set_property (string_compose("%1%2", _menu_name, X_("-rightpane-pos")).c_str(), content_right_pane.get_divider ());
|
||||
}
|
||||
if (_panelayout & PaneLeft) {
|
||||
node.set_property (string_compose("%1%2", _menu_name, X_("-leftpane-pos")).c_str(), content_left_pane.get_divider ());
|
||||
}
|
||||
if (_panelayout & PaneBottom) {
|
||||
node.set_property (string_compose("%1%2", _menu_name, X_("-bottompane-pos")).c_str(), content_midlevel_vpane.get_divider ());
|
||||
}
|
||||
node.set_property (string_compose("%1%2", _menu_name, X_("-rightpane-pos")).c_str(), content_right_pane.get_divider ());
|
||||
node.set_property (string_compose("%1%2", _menu_name, X_("-leftpane-pos")).c_str(), content_left_pane.get_divider ());
|
||||
|
||||
return node;
|
||||
}
|
||||
@ -486,10 +466,6 @@ Tabbable::set_state (const XMLNode& node, int version)
|
||||
fract = std::max (.05f, std::min (.95f, fract));
|
||||
content_left_pane.set_divider (0, fract);
|
||||
}
|
||||
if ( window_node->get_property (string_compose("%1%2", _menu_name, X_("-bottompane-pos")).c_str(), fract) ) {
|
||||
fract = std::max (.05f, std::min (.95f, fract));
|
||||
content_midlevel_vpane.set_divider (0, fract);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
@ -49,15 +49,16 @@ class LIBWIDGETS_API Tabbable : public Gtkmm2ext::WindowProxy
|
||||
{
|
||||
public:
|
||||
enum PaneLayout {
|
||||
NoPanes = 0x00, ///< disable all attachment buttons, do not pack any panes or attachments
|
||||
PaneLeft = 0x01, ///< left side attachment is a resizable pane
|
||||
PaneRight = 0x02, ///< pack a resizable Pane on the right-side
|
||||
PaneBottom = 0x04, ///< bottom Ebox is a resizable Pane
|
||||
AttLeft = 0x08, ///< if PaneLeft is not set, pack a fixed size Ebox on the left (Editor-Mixer)
|
||||
AttBottom = 0x10, ///< bottom is a fixed size EBox attachment
|
||||
NoPanes = 0x0, ///< disable all attachment buttons, do not pack any panes or attachments
|
||||
PaneLeft = 0x1, ///< left side attachment is a resizable pane
|
||||
PaneRight = 0x2, ///< pack a resizable Pane on the right-side
|
||||
AttBottom = 0x4, ///< bottom is a fixed size EBox attachment
|
||||
PaneLeftBtm = 0x5,
|
||||
PaneRightBtm = 0x6,
|
||||
AttLeft = 0x8, ///< if PaneLeft is not set, pack a fixed size Ebox on the left (Editor-Mixer)
|
||||
};
|
||||
|
||||
Tabbable (const std::string& user_visible_name, std::string const & untranslated_name, Gtk::Widget* top = NULL, bool tabbed_by_default = true, PaneLayout pl = PaneRight);
|
||||
Tabbable (const std::string& user_visible_name, std::string const & untranslated_name, Gtk::Widget* top = NULL, bool tabbed_by_default = true, PaneLayout pl = PaneRightBtm);
|
||||
~Tabbable ();
|
||||
|
||||
void add_to_notebook (Gtk::Notebook& notebook);
|
||||
@ -129,7 +130,7 @@ protected:
|
||||
* | |
|
||||
* | +--content_hbox--OR--content_left_pane--------------------------------------------------------+ |
|
||||
* | | | |
|
||||
* | | +--att_left--+ +--content_midlevel_vbox--OR-content_midlevel_vpane----------------------+ | |
|
||||
* | | +--att_left--+ +--content_midlevel_vbox-------------------------------------------------+ | |
|
||||
* | | $ (EBOX) | | +--content_right_pane------------------------------------------------+ | | |
|
||||
* | | | | | | +--content_inner_vbox-----------------+ +--content_right_vbox--+ | | | |
|
||||
* | | | O | | | | | | | | | | |
|
||||
@ -146,8 +147,7 @@ protected:
|
||||
* | | | | N | | | +---------------------------------+ | | +------------------+ | | | | |
|
||||
* | | | (STRIP) | E | | +-------------------------------------+ +----------------------+ | | | |
|
||||
* | | | |<->| +--------------------------------------------------------------------+ | | |
|
||||
* | | | | | 🡅 OPTIONAL 🡅 | | |
|
||||
* | | | | | 🡇 PANE 🡇 | | |
|
||||
* | | | | | | | |
|
||||
* | | | | | +-content_att_bottom-------------------------------------------------+ | | |
|
||||
* | | | | | $ (EBOX) | | | |
|
||||
* | | | | | | OPTIONAL BOTTOM (PROPERTIES) | | | |
|
||||
@ -171,7 +171,6 @@ protected:
|
||||
HPane content_left_pane;
|
||||
Gtk::HBox content_hbox;
|
||||
EventBoxExt content_att_left; /* a placeholder for the mixer strip, if you want one */
|
||||
VPane content_midlevel_vpane;
|
||||
Gtk::VBox content_midlevel_vbox;
|
||||
HPane content_right_pane;
|
||||
Gtk::VBox content_inner_vbox;
|
||||
|
@ -23,7 +23,7 @@ class Rx1
|
||||
public:
|
||||
Rx1 (Tx& sender)
|
||||
{
|
||||
sender.sig1.connect_same_thread (_connection, std::bind (&Rx1::cb, this, _1));
|
||||
sender.sig1.connect_same_thread (_connection, boost::bind (&Rx1::cb, this, _1));
|
||||
}
|
||||
|
||||
private:
|
||||
@ -87,7 +87,7 @@ class Rx2 : public PBD::ScopedConnectionList
|
||||
public:
|
||||
Rx2 (Tx& sender)
|
||||
{
|
||||
sender.sig1.connect (*this, &_ir, std::bind (&Rx2::cb, this, _1), &event_loop);
|
||||
sender.sig1.connect (*this, &_ir, boost::bind (&Rx2::cb, this, _1), &event_loop);
|
||||
}
|
||||
|
||||
private:
|
||||
|
Loading…
Reference in New Issue
Block a user