| 7 | |
| 8 | |
| 9 | struct BlankModule : Module { |
| 10 | int width = 10; |
| 11 | |
| 12 | /** Legacy for <=v1 patches */ |
| 13 | void fromJson(json_t* rootJ) override { |
| 14 | Module::fromJson(rootJ); |
| 15 | json_t* widthJ = json_object_get(rootJ, "width"); |
| 16 | if (widthJ) |
| 17 | width = std::round(json_number_value(widthJ) / RACK_GRID_WIDTH); |
| 18 | } |
| 19 | |
| 20 | json_t* dataToJson() override { |
| 21 | json_t* rootJ = json_object(); |
| 22 | json_object_set_new(rootJ, "width", json_integer(width)); |
| 23 | return rootJ; |
| 24 | } |
| 25 | |
| 26 | void dataFromJson(json_t* rootJ) override { |
| 27 | json_t* widthJ = json_object_get(rootJ, "width"); |
| 28 | if (widthJ) |
| 29 | width = json_integer_value(widthJ); |
| 30 | } |
| 31 | }; |
| 32 | |
| 33 | |
| 34 | struct BlankPanel : Widget { |
nothing calls this directly
no outgoing calls
no test coverage detected