Skip to content

Commit

Permalink
Info dialogs 0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
rerdavies committed Oct 3, 2023
1 parent 13ee45d commit 24bc7b9
Show file tree
Hide file tree
Showing 199 changed files with 1,931 additions and 364 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ add_subdirectory ("src")
export(TARGETS lvtk lvtk_ui NAMESPACE Lvtk FILE FindLvtk.cmake)

# set(CPACK_GENERATOR "DEB")
# set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Robin Davies <rerdavies at gmail.com>") # required
# set(CPACK_DEBIAN_PACKAGE_MAINTAINER "Robin E. R. Davies <rerdavies at gmail.com>") # required
# set(CPACK_PACKAGE_VENDOR "Robin Davies")
# set(CPACK_PACKAGE_DESCRIPTION_FILE "${CMAKE_CURRENT_SOURCE_DIR}/debian/package_description.txt")
# set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "TooB LV2 Guitar Effects Pedals")
Expand Down
17 changes: 16 additions & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Copyright (c) 2023 Robin Davies
Copyright (c) 2023 Robin E. R. Davies

Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
Expand All @@ -16,3 +16,18 @@ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

===

Third-party licenses:

This project includes files, and uses dependencies that are
licensed under a variety of 3rd-party Open Source licenses (none of them GPL).

A complete list of machine-generated 3rd-party licenses can be found in the files debian/copyrights-raw and debian/copyright-fixups.

As part of the build process, the ToobAmp build generates a
cleaner and more legible set of license notices that can be found in the file build/src/ToobAmp.lv2/LICENSE.md. This file
can also be found at /usr/lib/lv2/ToobAmp.lv2/LICENSE.md
after ToobAmp is installed.

6 changes: 3 additions & 3 deletions src/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,9 @@ endif()



message(STATUS "CMAKE_DEB_HOST_ARCH: ${CMAKE_DEB_HOST_ARCH}")
message(STATUS "CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
message(STATUS "CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")
message(STATUS "lvtk: CMAKE_DEB_HOST_ARCH: ${CMAKE_DEB_HOST_ARCH}")
message(STATUS "lvtk: CMAKE_CXX_FLAGS_DEBUG: ${CMAKE_CXX_FLAGS_DEBUG}")
message(STATUS "lvtk: CMAKE_CXX_FLAGS_RELEASE: ${CMAKE_CXX_FLAGS_RELEASE}")

add_subdirectory(generate_lvtk_plugin_info)
add_subdirectory(lvtk)
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/AutoLilvNode.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/AutoLilvNode.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
1 change: 1 addition & 0 deletions src/generate_lvtk_plugin_info/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ endif()


add_executable(generate_lvtk_plugin_info
$<TARGET_OBJECTS:lvtk> $<TARGET_OBJECTS:lvtk_ui>
LilvPiPedalUI.cpp
LilvPiPedalUI.hpp
AutoLilvNode.cpp
Expand Down
4 changes: 3 additions & 1 deletion src/generate_lvtk_plugin_info/ClassFileWriter.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -255,6 +255,8 @@ void ClassFileWriter::Write(const std::shared_ptr<Lv2PluginInfo> pluginInfo)
s << Tab() << "using namespace lvtk::ui;" << endl;
s << endl;

WRITE_PROPERTY(pluginInfo, uri)

WRITE_PROPERTY(pluginInfo, name)
WRITE_PROPERTY(pluginInfo, brand)
WRITE_PROPERTY(pluginInfo, label)
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/ClassFileWriter.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions src/generate_lvtk_plugin_info/CommandLineParser.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand All @@ -19,7 +19,7 @@

// MIT License
//
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy
// of this software and associated documentation files (the "Software"), to deal
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/LilvPiPedalUI.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/LilvPiPedalUI.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/LilvPluginInfo.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/LilvPluginInfo.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/main.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/generate_lvtk_plugin_info/ss.hpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
6 changes: 5 additions & 1 deletion src/lvtk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ if (0)
endforeach()
endif()

add_library(lvtk STATIC
add_library(lvtk OBJECT
./include/lvtk/LvtkObject.hpp
./include/lvtk/IcuString.hpp
./include/lvtk/JsonVariant.hpp
Expand Down Expand Up @@ -107,6 +107,10 @@ add_library(lvtk STATIC
./include/lvtk/LvtkSlideInOutAnimationElement.hpp
./include/lvtk/LvtkCieColors.hpp
./include/lvtk/LvtkGroupElement.hpp
./include/lvtk/LvtkTableElement.hpp
./include/lvtk/LvtkMarkdownElement.hpp
./LvtkMarkdownElement.cpp
./LvtkTableElement.cpp
./LvtkGroupElement.cpp
./LvtkCieColors.cpp
./LvtkSlideInOutAnimationElement.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/IcuString.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkAnimator.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkBindingProperty.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkButtonBaseElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
4 changes: 2 additions & 2 deletions src/lvtk/LvtkButtonElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -122,7 +122,7 @@ void LvtkButtonElement::RebuildChildren()
.FlexAlignItems(LvtkAlignment::Center)
.FlexJustification(LvtkFlexJustification::Start)
.HorizontalAlignment(LvtkAlignment::Start)
.FlexColumnGap(8)
.ColumnGap(8)
;
typography->Style()
.TextAlign(LvtkTextAlign::Start)
Expand Down
26 changes: 25 additions & 1 deletion src/lvtk/LvtkContainerElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -126,6 +126,30 @@ void LvtkContainerElement::FinalizeLayout(const LvtkRectangle &layoutClipBounds,
}
}

bool LvtkContainerElement::FireScrollWheel(LvtkScrollWheelEventArgs &event)
{
if (Style().Visibility() == LvtkVisibility::Visible)
{

if (this->screenBorderBounds.Contains(event.screenPoint))
{
for (int64_t i = children.size() - 1; i >= 0; --i)
{
auto child = children[i];
if (child->screenBorderBounds.Contains(event.screenPoint))
{
if (child->FireScrollWheel(event))
return true;
}
}
}
return super::FireScrollWheel(event);
}
return false;

}


bool LvtkContainerElement::FireMouseDown(LvtkMouseEventArgs &event)
{
if (Style().Visibility() == LvtkVisibility::Visible)
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDamageList.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDialBaseElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDialElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDialog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDrawingContext.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDropShadowElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDropdownElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkDropdownItemElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkEditBoxElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
32 changes: 30 additions & 2 deletions src/lvtk/LvtkElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down Expand Up @@ -697,6 +697,16 @@ bool LvtkElement::OnMouseDown(LvtkMouseEventArgs &event)
}
return false;
}
bool LvtkElement::OnScrollWheel(LvtkScrollWheelEventArgs &event)
{
if (ScrollWheel.Fire(event))
{
return true;
}
return false;
}


bool LvtkElement::OnMouseUp(LvtkMouseEventArgs &event)
{
if (MouseUp.Fire(event))
Expand Down Expand Up @@ -775,6 +785,23 @@ bool LvtkElement::FireKeyDown(const LvtkKeyboardEventArgs &event)
return false;
}

bool LvtkElement::FireScrollWheel(LvtkScrollWheelEventArgs &event)
{
if (Style().Visibility() == LvtkVisibility::Visible)
{
if (this->screenBorderBounds.Contains(event.screenPoint))
{
event.point = event.screenPoint - LvtkPoint(this->screenClientBounds.Left(), this->screenClientBounds.Top());
if (OnScrollWheel(event))
{
return true;
}
}
}
return false;
}


bool LvtkElement::FireMouseDown(LvtkMouseEventArgs &event)
{
if (Style().Visibility() == LvtkVisibility::Visible)
Expand Down Expand Up @@ -1217,4 +1244,5 @@ void LvtkElement::OnLayoutComplete()

bool LvtkElement::LayoutValid() const {
return this->layoutValid;
}
}

12 changes: 6 additions & 6 deletions src/lvtk/LvtkFlexGridElement.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand All @@ -25,8 +25,8 @@ using namespace lvtk;
LvtkSize LvtkFlexGridElement::MeasureClient(LvtkSize constraint, LvtkSize available, LvtkDrawingContext &context)
{
this->clipChildren = false;
flexRowGap = Style().FlexRowGap().PixelValue();
flexColumnGap = Style().FlexColumnGap().PixelValue();
flexRowGap = Style().RowGap().PixelValue();
flexColumnGap = Style().ColumnGap().PixelValue();

childInfos.resize(0);
flows.resize(0);
Expand Down Expand Up @@ -286,7 +286,7 @@ LvtkSize LvtkFlexGridElement::MeasureClient(LvtkSize constraint, LvtkSize availa

double rowGap = currentFlow.childStart == currentFlow.childEnd ? 0: this->flexRowGap;

if (element->Style().VerticalAlignment() == LvtkAlignment::Stretch && constraint.Width() != 0) // only stretch if we are stretchy.
if (element->Style().HorizontalAlignment() == LvtkAlignment::Stretch && constraint.Width() != 0) // only stretch if we are stretchy.
{
ChildInfo childInfo;
childInfo.nFlow = nFlow;
Expand Down Expand Up @@ -481,8 +481,8 @@ LvtkSize LvtkFlexGridElement::Arrange(LvtkSize available, LvtkDrawingContext &co
LvtkSize paddingSize = this->removeThickness(borderSize,style.BorderWidth());
LvtkSize clientSize = this->removeThickness(paddingSize,style.Padding());

double columnGap = Style().FlexColumnGap().PixelValue();
double rowGap = Style().FlexRowGap().PixelValue();
double columnGap = Style().ColumnGap().PixelValue();
double rowGap = Style().RowGap().PixelValue();
if (style.FlexDirection() == LvtkFlexDirection::Row)
{
double top = 0;
Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkGroupElement.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ LvtkGroupElement::LvtkGroupElement()
flexGrid->Style()
.HorizontalAlignment(LvtkAlignment::Start)
.FlexWrap(LvtkFlexWrap::Wrap)
.FlexRowGap(16);
.RowGap(16);

super::AddChild(flexGrid);

Expand Down
2 changes: 1 addition & 1 deletion src/lvtk/LvtkLog.cpp
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Copyright (c) 2023 Robin Davies
// Copyright (c) 2023 Robin E. R. Davies
//
// Permission is hereby granted, free of charge, to any person obtaining a copy of
// this software and associated documentation files (the "Software"), to deal in
Expand Down
Loading

0 comments on commit 24bc7b9

Please sign in to comment.