Forum

    • Register
    • Login
    • Search
    • Categories

    Tablemode viewport

    General Questions
    4
    11
    219
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • d.healey
      d.healey last edited by

      Sounds useful, tell me more 🙂 Also what's the new automation object thingy for?

      Libre Wave - Freedom respecting instruments and effects
      My Patreon - HISE tutorials
      YouTube Channel - Public HISE tutorials

      Christoph Hart 1 Reply Last reply Reply Quote 0
      • Christoph Hart
        Christoph Hart @d.healey last edited by

        @d-healey You can make tables with multiple columns (just like the macro edit table or midi automation table).

        You define the columns with a JSON object and then populate the rows with another object.

        I've written some docs, but I still need to work on it before the API stabilizes, but this will be the goto solution for all browsers or dynamic tables.

        d.healey 1 Reply Last reply Reply Quote 4
        • d.healey
          d.healey @Christoph Hart last edited by

          @Christoph-Hart Excellent!

          Libre Wave - Freedom respecting instruments and effects
          My Patreon - HISE tutorials
          YouTube Channel - Public HISE tutorials

          Christoph Hart 1 Reply Last reply Reply Quote 0
          • Christoph Hart
            Christoph Hart @d.healey last edited by

            @d-healey I've pushed the docs for the functions, but I need to build the docs before they show up in the official docs:

            https://github.com/christophhart/hise_documentation/tree/master/scripting/scripting-api/scriptedviewport

            Christoph Hart 1 Reply Last reply Reply Quote 1
            • Christoph Hart
              Christoph Hart @Christoph Hart last edited by

              And here's an example how to use those functions:

              const var Viewport1 = Content.getComponent("Viewport1");
              
              // Enable Table mode
              Viewport1.setTableMode({
              	"RowHeight": 24
              });
              
              // Set the column layout
              Viewport1.setTableColumns([
              {
              	"ID": "FirstID",
              	"Label": "First Column",
              	"Type": "Text",
              	"Width":200
              },
              {
              	"ID": "SecondID",
              	"Label": "Buttonz",
              	"Type": "Button",
              	"Text": "OK",
              	"Toggle": true,
              	"Width": 60
              },
              {
              	"ID": "ThirdID",
              	"Type": "Slider",
              	"MaxValue": 5.0,
              	"StepSize": 1.0,
              	"Width": 80
              }]);
              
              // Populate the table with some data
              // (this call can be called anytime)
              Viewport1.setTableRowData([
                { "FirstID": "Some Text", "SecondID": true, "ThirdID": 3.0 },
                { "FirstID": "Some other Text", "SecondID": false, "ThirdID": 1.0 },
                { "FirstID": "Last line!", "SecondID": true, "ThirdID": 4.0 }
              ]);
              
              inline function onTableCallback(obj)
              {
              	Console.print(trace(obj));
              	
              	if(obj.Type == "Click")
              	{
              		Console.print("Clicked on " + obj.rowIndex);
              	}
              };
              
              Viewport1.setTableCallback(onTableCallback);
              
              1 Reply Last reply Reply Quote 2
              • Lindon
                Lindon last edited by

                can I say this?

                Viewport1.setTableColumns([
                {
                	"ID": "FirstID",
                	"Label": "First Column",
                	"Type": "Panel",
                	"Width":200
                },
                

                I assume this would then populate the Panel.value, and I can use my own redraw callback...

                HISE Development for hire.
                www.channelrobot.com

                Christoph Hart 1 Reply Last reply Reply Quote 0
                • Christoph Hart
                  Christoph Hart @Lindon last edited by

                  @Lindon Nope, only Buttons and Sliders are available at the moment - I might add ComboBoxes and Images, but Panels are too heavyweight for this - then we're back in child-panel nightmare-land

                  You can skin the buttons and sliders with look and feel though so you can get pretty far.

                  1 Reply Last reply Reply Quote 0
                  • d.healey
                    d.healey last edited by

                    This is a really cool feature. I have no idea what I'll use it for yet but I'm sure it will come in handy. Thanks!

                    Libre Wave - Freedom respecting instruments and effects
                    My Patreon - HISE tutorials
                    YouTube Channel - Public HISE tutorials

                    Christoph Hart 1 Reply Last reply Reply Quote 0
                    • Christoph Hart
                      Christoph Hart @d.healey last edited by

                      @d-healey It's prime use case is for custom preset / samplemap browsers but it could also be used for modulation matrix editors etc.

                      Maybe your downloader app could also benefit from this.

                      d.healey DanH 2 Replies Last reply Reply Quote 2
                      • d.healey
                        d.healey @Christoph Hart last edited by

                        @Christoph-Hart said in Tablemode viewport:

                        Maybe your downloader app could also benefit from this.

                        Are you thinking of the product grid?

                        That might be a use case but I'd need to be able to draw images and probably make the images clickable. I think I'd still need the panels for the download progress.

                        Libre Wave - Freedom respecting instruments and effects
                        My Patreon - HISE tutorials
                        YouTube Channel - Public HISE tutorials

                        1 Reply Last reply Reply Quote 1
                        • DanH
                          DanH @Christoph Hart last edited by

                          @Christoph-Hart ah great timing! Was hoping for something like this 🙂

                          Can clicking a line in the left column change what's visible in the right hand column for example?

                          1 Reply Last reply Reply Quote 0
                          • First post
                            Last post

                          15
                          Online

                          982
                          Users

                          6.6k
                          Topics

                          60.8k
                          Posts