25 #ifndef TBX_RES_ProgInfo_H
26 #define TBX_RES_ProgInfo_H
28 #include "resobject.h"
45 enum { CLASS_ID = 0x82b40 };
53 ResObject(name, CLASS_ID, has_web_button ? 101 : 100, 36 + (has_web_button ? 40 : 32))
55 if (has_web_button)
flags(24);
319 void uri(
const char *value)
322 if (
object_version() < 101)
throw std::invalid_argument(
"ProgInfo version not high enough for URI");
333 void uri(
const std::string &value)
336 if (
object_version() < 101)
throw std::invalid_argument(
"ProgInfo version not high enough for URI");
355 if (
object_version() < 101)
throw std::invalid_argument(
"ProgInfo version not high enough for URI");
363 #endif // TBX_RES_ProgInfo_H
bool generate_about_to_be_shown() const
Check if the about to be shown event should be generated.
Definition: resproginfo.h:126
void licence_type(int type)
Set the licence type.
Definition: resproginfo.h:261
void version(const std::string &value)
Set the version of the application.
Definition: resproginfo.h:279
void init_string(int offset, const char *value)
Initialise a string in a constructor helper.
Definition: resbase.cc:1725
void generate_about_to_be_shown(bool value)
Set if the about to be shown event should be generated.
Definition: resproginfo.h:132
bool generate_dialogue_completed() const
Check if the dialogue completed event should be generated.
Definition: resproginfo.h:138
bool generate_web_page_click() const
Check if the web page button generates a click event.
Definition: resproginfo.h:176
void message_with_length(int offset, const char *value, int length=-1)
Assign a message where the length is at offset+4.
Definition: resbase.cc:1639
bool include_web_page_button() const
Check if the web page button is included on the dialogue.
Definition: resproginfo.h:167
void web_event(int event_id)
Set the event generated for web page click added with version 1.01.
Definition: resproginfo.h:352
void uri(const std::string &value)
Set URI.
Definition: resproginfo.h:333
void flags(unsigned int value)
Set all flags as a word.
Definition: resproginfo.h:120
bool flag(int offset, int mask) const
Check if any of the bits in a mask are set.
Definition: resbase.h:352
ResProgInfo & operator=(const ResObject &other)
Assignment from ResObject.
Definition: resproginfo.h:98
void author(const std::string &value)
Set the author of the application.
Definition: resproginfo.h:239
int web_event() const
Get the event generated for web page click added with version 1.01.
Definition: resproginfo.h:345
int licence_type() const
Get the licence type.
Definition: resproginfo.h:246
void include_licence_type(bool value)
Set if licence type is included on the dialogue.
Definition: resproginfo.h:157
void window(const std::string &value)
Set the name of the window template that provides the window for this object.
Definition: resproginfo.h:301
int max_title() const
Get the maximum size the title can be.
Definition: resproginfo.h:203
const char * message(int offset) const
Get the message string at the given offset.
Definition: resbase.cc:1602
int object_version() const
Return version number * 100.
Definition: resobject.h:93
ResProgInfo(const ResObject &other)
Construct from a ResObject.
Definition: resproginfo.h:80
void generate_dialogue_completed(bool value)
Set if the dialogue completed event should be generated.
Definition: resproginfo.h:144
bool include_licence_type() const
Check if licence type is included on the dialogue.
Definition: resproginfo.h:151
void title(const std::string &value, int max_length=-1)
Set the title of the dialogue.
Definition: resproginfo.h:199
const char * string(int offset) const
Return a string at the given offset.
Definition: resbase.cc:1555
const char * uri() const
Get URI.
Definition: resproginfo.h:310
unsigned int flags() const
Get all flags as a word raw access.
Definition: resproginfo.h:112
void version(const char *value)
Set the version of the application.
Definition: resproginfo.h:273
const char * window() const
Get the name of the window template that provides the window for this object.
Definition: resproginfo.h:287
unsigned int uint_value(int offset) const
Get an unsigned integer value.
Definition: resbase.h:324
ResObject & operator=(const ResObject &other)
Assignment.
Definition: resobject.cc:109
ResProgInfo(const ResProgInfo &other)
Copy constructor.
Definition: resproginfo.h:73
void purpose(const char *value)
Set the purpose of the application.
Definition: resproginfo.h:215
void title(const char *value, int max_length=-1)
Set the title of the dialogue.
Definition: resproginfo.h:191
Base class for a resource object that can be edited.
Definition: resobject.h:52
ResProgInfo(std::string name, bool has_web_button=false)
Constructor and empty ResProgInfo.
Definition: resproginfo.h:52
const char * purpose() const
Get the purpose.
Definition: resproginfo.h:208
const char * version() const
Get the version.
Definition: resproginfo.h:266
void uri(const char *value)
Set URI.
Definition: resproginfo.h:319
ResProgInfo & operator=(const ResProgInfo &other)
Assignment.
Definition: resproginfo.h:87
const char * title() const
Get the title of the dialogue.
Definition: resproginfo.h:183
Class to represent a ProgInfo resource.
Definition: resproginfo.h:42
const char * author() const
Get the author.
Definition: resproginfo.h:226
void purpose(const std::string &value)
Set the purpose of the application.
Definition: resproginfo.h:221
int int_value(int offset) const
Get an integer value.
Definition: resbase.h:316
void window(const char *value)
Set the name of the window template that provides the window for this object.
Definition: resproginfo.h:294
const char * name() const
Return pointer to name of object.
Definition: resobject.h:79
void author(const char *value)
Set the author of the application.
Definition: resproginfo.h:233
void check_class_id(int class_id) const
Check if this objects class id is as specified.
Definition: resobject.cc:383
void init_message(int offset, const char *value)
Initialise a message in a constructor helper.
Definition: resbase.cc:1736