diff options
| author | Matthias Melcher <github@matthiasm.com> | 2025-12-06 02:50:28 +0100 |
|---|---|---|
| committer | Matthias Melcher <github@matthiasm.com> | 2025-12-06 02:50:28 +0100 |
| commit | b1d3ee13bd1be3fefda2be490ce773afab2ade04 (patch) | |
| tree | 84e182175cc6403dadce8c28604afd3edbe4304f /fluid/nodes/Function_Node.h | |
| parent | 5e7ed2f6534bf8d99688e375c56f44f792bdf7bb (diff) | |
Fluid: modernize Function Node class
Diffstat (limited to 'fluid/nodes/Function_Node.h')
| -rw-r--r-- | fluid/nodes/Function_Node.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/fluid/nodes/Function_Node.h b/fluid/nodes/Function_Node.h index 282f33312..33bcc1849 100644 --- a/fluid/nodes/Function_Node.h +++ b/fluid/nodes/Function_Node.h @@ -271,9 +271,9 @@ public: typedef Node super; static Class_Node prototype; private: - const char* subclass_of; - char public_; + std::string base_class_; std::string prefix_; + char public_; public: Class_Node(); ~Class_Node(); @@ -294,16 +294,20 @@ public: bool is_a(Type inType) const override { return (inType==Type::Class) ? true : super::is_a(inType); } void write_properties(fld::io::Project_Writer &f) override; void read_property(fld::io::Project_Reader &f, const char *) override; - const char* base_class_name() { return subclass_of; } - void base_class_name(const char* name) { storestring(name, subclass_of); } + + /** Get base class access and name. */ + std::string base_class() { return base_class_; } + /** Set base class access and name, i.e. `public Fl_Widget`. */ + void base_class(const std::string& name) { storestring(name, base_class_); } + char visibility() { return public_; } void visibility(char v) { public_ = v; } // class prefix attribute access - /** Set the text between `class` and the class name */ - void prefix(const std::string& p) { prefix_ = p; } /** Get the text between `class` and the class name */ std::string prefix() const { return prefix_; } + /** Set the text between `class` and the class name */ + void prefix(const std::string& p) { prefix_ = p; } }; #endif // FLUID_NODES_FUNCTION_NODE_H |
