Now with the ability to ask for formtted text

This commit is contained in:
Greg Hellings
2025-02-25 10:46:07 -06:00
parent a2fcfb1724
commit be7d2873e6
7 changed files with 99 additions and 46 deletions
+12 -17
View File
@@ -1,27 +1,22 @@
#pragma once
#include <sword/swmodule.h>
#include <string>
#include "rust/cxx.h"
class Module {
private:
sword::SWModule* module;
namespace sword_rs {
class Module {
private:
sword::SWModule* module;
public:
Module(sword::SWModule* module) : module(module) { };
public:
Module(sword::SWModule* module);
rust::String get_name() const {
return rust::String(this->module->getName());
}
rust::String get_name() const;
rust::String strip_text() {
return std::string(
(const char*) this->module->stripText()
);
}
rust::String strip_text();
void set_key_text(const rust::String& keyText) {
this->module->setKeyText(std::string(keyText).c_str());
}
};
void set_key_text(const rust::String& keyText);
};
}