-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browser expand into multi-files (#1487)
* Browser expand into multi-files - Have an isExpandable - Have the browser sidebar have a toggle icon which toggles - Add an interface rather than a prop for drag dat - Add 'CompoundElement/compound_file' type with streaming - Load SF2 Sub-Sample into New Zone or Variant works So good checkpoint here. Still a lot to do including other formats and instruments. * missing header
- Loading branch information
Showing
19 changed files
with
491 additions
and
104 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// | ||
// Created by Paul Walker on 1/28/25. | ||
// | ||
|
||
#ifndef BROWSERPANEINTERFACES_H | ||
#define BROWSERPANEINTERFACES_H | ||
|
||
#include <optional> | ||
#include "filesystem/import.h" | ||
#include "sample/compound_file.h" | ||
|
||
namespace scxt::ui::app::browser_ui | ||
{ | ||
struct WithSampleInfo | ||
{ | ||
virtual ~WithSampleInfo() {} | ||
virtual std::optional<fs::directory_entry> getDirEnt() const = 0; | ||
virtual std::optional<sample::compound::CompoundElement> getCompoundElement() const = 0; | ||
}; | ||
|
||
template <typename T> static bool hasSampleInfo(const T &t) | ||
{ | ||
return dynamic_cast<const WithSampleInfo *>(t.get()) != nullptr; | ||
} | ||
|
||
template <typename T> static WithSampleInfo *asSampleInfo(const T &t) | ||
{ | ||
return dynamic_cast<WithSampleInfo *>(t.get()); | ||
} | ||
|
||
} // namespace scxt::ui::app::browser_ui | ||
#endif // BROWSERPANEINTERFACES_H |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.