Camfrog Bot 6.
0 for Windows
Developers Guide
Camfrog Bot 6.0 for Windows Developer's Guide
Table of Contents
Introduction ................................................................................................................................................... 3
Low-level development .............................................................................................................................. 3
Plug-in module SDK ....................................................................................................................................... 3
Plug-In Module Architecture ......................................................................................................................... 4
Functions Description .................................................................................................................................... 5
Callback functions exported by the bot: ................................................................................................... 5
Callback functions exported by the plug-in: .............................................................................................. 8
Structures Description ................................................................................................................................. 12
Events Description ....................................................................................................................................... 15
Chat Room Connection Events ................................................................................................................ 15
Central Server Instant Message Effects ................................................................................................... 15
Chatroom text/talk/users Events ............................................................................................................ 16
Bot to Bot Events ..................................................................................................................................... 18
Service Channel Events ............................................................................................................................ 18
Plug-in to Bot Events ............................................................................................................................... 19
Settings Events ........................................................................................................................................ 21
Window XML Description ............................................................................................................................ 22
Examples .................................................................................................................................................. 28
2013 Camshare Inc.
Page 2
Camfrog Bot 6.0 for Windows Developer's Guide
Introduction
Welcome to the Camfrog Bot Developer's Guide. If you are a new Camfrog Bot user please start by
reading Camfrog Bot User Guide. This manual describes the Camfrog Bot plug-in modules
architecture and the process of custom plug-in modules creation.
Camfrog Bot is a plug-in oriented application which allows users to increase the default
functionality of application by developing and using their own plug-in modules.
There are two basic ways of plug-in modules development, which Camfrog Bot application
performs: low-level development and plug-in SDK.
Low-level development
This way performs the very basic, but flexible development tools which could be useful for Delphi
or Visual Basic developers or for those who want to implement their own SDK according to their
purposes, because much high-level implementation routine is required.
Here is the list of features this way provides:
-
Camfrog Bot application callbacks;
Plug-in module callbacks;
Headers of the packets for application-module (and vice versa) communication;
XML description of UI elements (buttons, lists, group boxes etc).
This manual describes low-level way of implementation.
Plug-in module SDK
In addition to the low-level tools for modules development, Camfrog Bot provides easy-to-use
object-oriented SDK where most of the routines are already implemented. Here is the list of features
performed by this SDK:
-
Configuration file parser;
Camfrog Bot packets handlers which could be overridden by the developer;
UI engine which provides methods for constructing interface elements (no need to parse
XML).
This way of implementation makes the code more clear and compact. It is strongly recommended
for C++ developers to use this SDK.
2013 Camshare Inc.
Page 3
Camfrog Bot 6.0 for Windows Developer's Guide
Camfrog Bot SDK depends on the boost libraries which can be downloaded from:
[Link]
See ${CFBOT_INSTALL_DIR}\Help\Camfrog Bot [Link] for more information.
Plug-In Module Architecture
This article describes plug-in modules architecture for developers to write their own plug-ins. See
also the sources of the sample Version plug-in we supply with Camfrog Bot.
All the events that Camfrog Bot 5.0 provides to the modules are divided into several types (see the
Events Description section for more details).
Every plug-in module subscribes on a group (groups) of events and receives events from these
groups only. Every module has its own unique 8-byte id. For example, the Trivia game plug-in has a
CSLLCTRV id. Invent your own id for your plug-in.
The communication between the plug-in modules and the bot is implemented via several callback
functions (see the Functions Description section for more details).
To build the module's settings window we use xml (see the Window XML Description for more
details). There are three types of xml we use:
up;
the first one contains a list of the bot's controls and is loaded once on the first plugin starts
the second one contains the form with the list of controls and their parameters;
the third one contains the current state of the window it is a communication protocol
between the plugin and the bot used to notify the plugin about settings changes and get an
appropriate response.
2013 Camshare Inc.
Page 4
Camfrog Bot 6.0 for Windows Developer's Guide
Functions Description
Exported by the bot:
cfbot_subscribe
cfbot_unsubscribe
cfbot_pushevent
cfbot_init_settings
Exported by the plug-in:
cfbot_initialize
cfbot_finalize
cfbot_add_client
cfbot_remove_client
cfbot_plugininformation
cfbot_pushevent
Callback functions exported by the bot:
cfbot_subscribe
The cfbot_subscribe function subscribes the plug-in on a group(s) of events.
Syntax
void callback cfbot_subscribe(
__in
void *CONTEXT,
__in
char *PLUGIN_ID,
__in
u_long EVENTS_TYPE
);
Parameters
2013 Camshare Inc.
Page 5
Camfrog Bot 6.0 for Windows Developer's Guide
context [in]
a pointer to the plug-in interface
plugin_id [in]
unique module ID. 8 chars + '\0'
events_type [in]
The group(s) of events to be subscribed on.
cfbot_unsubscribe
The cfbot_unsubscribe function unsubscribes the plug-in from a group(s) of events.
Syntax
void callback cfbot_unsubscribe(
__in
void *CONTEXT,
__in
char *PLUGIN_ID,
__in
u_long EVENTS_TYPE
);
Parameters
context [in]
a pointer to the plug-in interface
plugin_id [in]
unique module ID. 8 chars + '\0'
events_type [in]
The group(s) of events to be subscribed on.
cfbot_pushevent
The cfbot_pushevent function is called by the plug-in to make the bot process data.
2013 Camshare Inc.
Page 6
Camfrog Bot 6.0 for Windows Developer's Guide
Syntax
void callback cfbot_pushevent(
__in
void *CONTEXT,
__in
char *PLUGIN_ID,
__in
char* BOT_NAME,
__in
char *EVENT_DATA,
__in
int EVENT_SIZE
);
Parameters
context [in]
a pointer to the plug-in interface
plugin_id [in]
unique module ID. 8 chars + '\0'
bot_name [in]
bot name
event_data [in]
data to be processed by the bot
event_size [in]
data size (in bytes)
cfbot_init_settings
The cfbot_init_settings function is called by the plug-in to initialize the GUI engine for this
module (windows specific).
Syntax
2013 Camshare Inc.
Page 7
Camfrog Bot 6.0 for Windows Developer's Guide
void callback cfbot_init_settings(
__in
void *CONTEXT,
__in
char *PLUGIN_ID,
__in
char *EVENT_DATA,
__in
int *EVENT_SIZE
);
Parameters
context [in]
a pointer to the plug-in interface
plugin_id [in]
unique module ID. 8 chars + '\0'
event_data [in]
initial XML data
event_size [in]
data size (in bytes)
Callback functions exported by the plug-in:
cfbot_initialize
The cfbot_initialize function is called by the bot on plug-in loading to initialize it.
Syntax
int callback cfbot_initialize(
__in
CFBOT_CALLBACKS *callbacks,
__in
void *context
);
2013 Camshare Inc.
Page 8
Camfrog Bot 6.0 for Windows Developer's Guide
Parameters
callbacks [in]
A pointer to the CFBOT_CALLBACKS structure which contains the list of functions
exported by the bot
context [in]
A pointer to plug-in interface
Return value
Zero if an error has occurred, non-zero if successful.
cfbot_finalize
The cfbot_finalize function is called by the bot on plug-in unloading from memory.
Syntax
void callback cfbot_finalize (
);
cfbot_add_client
The cfbot_add_client function is called when the plug-in is turned on to add bots that are going to
use it.
Syntax
int callback cfbot_add_client (
__in
char* bot_name,
__in
char* work_dir
);
Parameters
2013 Camshare Inc.
Page 9
Camfrog Bot 6.0 for Windows Developer's Guide
bot_name [in]
Name of a bot that will be using the plug-in
work_dir [in]
Path to the bot profile directory
Return value
Zero if an error has occurred, non-zero if successful.
cfbot_remove_client
The cfbot_remove_client function is called when the plug-in is turned off or removed.
Syntax
void callback cfbot_remove_client (
__in
char* bot_name,
);
Parameters
bot_name [in]
Name of a bot that will no longer be using the plug-in
cfbot_plugininformation
The cfbot_plugininformation function is called by the bot on plug-in loading to get plug-in
information (unique ID, version, author, author's e-mail and web-page).
Syntax
void callback cfbot_plugininformation (
__in
CFBOT_PLUGININFORMATION *info,
);
2013 Camshare Inc.
Page 10
Camfrog Bot 6.0 for Windows Developer's Guide
Parameters
info [in]
A pointer to the CFBOT_PLUGININFORMATION structure which contains the plug-in
information
cfbot_pushevent
The cfbot_pushevent function is called by the bot to make the plug-in process data.
Syntax
void callback cfbot_pushevent (
__in
char* bot_name,
__in
char *event_data,
__in
int event_size
);
Parameters
bot_name [in]
Name of the bot the data belongs to
event_data [in]
Data to be processed by the bot
event_size [in]
data size (in bytes)
2013 Camshare Inc.
Page 11
Camfrog Bot 6.0 for Windows Developer's Guide
Structures Description
CFBOT_PLUGININFORMATION
CFBOT_CALLBACKS
CFBOT_PLUGIN_CALLBACKS
CFBOT_PLUGININFORMATION
The CFBOT_PLUGININFORMATION structure contains the plug-in module information.
Syntax
typedef struct CFBOT_PLUGININFORMATION {
short
pluginversion;
short
desired_botversion;
char
uniqid[9];
char
plugindescription[512];
char
authors[512];
char
email[512];
char
http[512];
} CFBOT_PLUGININFORMATION
Members
pluginversion
plug-in module version
desired_botversion
required bot version
uniqid
unique module ID. 8 chars + '\0'
plugindescription
module information
authors
2013 Camshare Inc.
Page 12
Camfrog Bot 6.0 for Windows Developer's Guide
modules authors
email
modules authors e-mail address
http
modules authors web page
CFBOT_CALLBACKS
The CFBOT_CALLBACKS structure contains the callback functions exported by the bot.
Syntax
typedef struct CFBOT_CALLBACKS {
void
cfbot_subscribe;
void
cfbot_unsubscribe;
void
cfbot_pushevent;
void
cfbot_init_settings;
} CFBOT_CALLBACKS;
Members
cfbot_subscribe
cfbot_subscribe function
cfbot_unsubscribe
cfbot_unsubscribe function
cfbot_pushevent
cfbot_pushevent function
cfbot_init_settings
cfbot_init_settings
function
CFBOT_PLUGIN_CALLBACKS
The CFBOT_PLUGIN_CALLBACKS structure contains the list of functions exported by the
plug-in.
2013 Camshare Inc.
Page 13
Camfrog Bot 6.0 for Windows Developer's Guide
Syntax
typedef struct CFBOT_PLUGIN_CALLBACKS {
int
cfbot_initialize;
void
cfbot_finalize;
int
cfbot_add_client;
void
cfbot_remove_client;
void
cfbot_plugininformation;
void
cfbot_pushevent;
} CFBOT_PLUGIN_CALLBACKS;
Members
cfbot_initialize
the cfbot_initialize function
cfbot_finalize
the cfbot_finalize function
cfbot_add_client
the cfbot_add_client function
cfbot_remove_client
the cfbot_remove_client function
cfbot_plugininformation
the cfbot_plugininformation function
cfbot_pushevent
the cfbot_pushevent function
2013 Camshare Inc.
Page 14
Camfrog Bot 6.0 for Windows Developer's Guide
Events Description
Chat room connection events
Central server instant message events
Chat room text/talk/users events
Bot to bot events
Service channel events
Plug-in to bot events
Settings events
Chat Room Connection Events
Event
Fields
Field type
Description
BOT_EVENT_ROOM_CONNECTED
An empty packet meaning that the bot is connected to a chat room.
(0x0101)
This packet is also delivered if the module is turned off and then
on.
BOT_EVENT_ROOM_DENIED
(0x0102)
An event that means the bot has been denied entry to a chat room.
deny reason (0x01)
std::string
BOT_EVENT_ROOM_KILLED
(0x0103)
Reason for the denial.
An event that means the bot has been kicked from the chat room.
kick reason (0x01)
std::string
Reason for the kick.
BOT_EVENT_ROOM_DISCONNECTED
An empty packet meaning that the bot has disconnected from the
(0x0104)
chat room.
Central Server Instant Message Effects
Event
Fields
Field type
BOT_EVENT_IM
Description
The bot has received an instant message.
(0x0201)
nickname from (0x01) std::string
Nickname of the message sender.
feedback (0x02)
int
User's feedback value.
age (0x03)
unsigned
Age of the message sender.
char
2013 Camshare Inc.
Page 15
Camfrog Bot 6.0 for Windows Developer's Guide
text (0x04)
std::string
Message text.
attributes (0x05)
unsigned
This value can be set to "0"; in this case the following parameters
char
are absent and the text has the default font and size
unsigned
Message text size.
size (0x06)
char
color (0x07)
unsigned
Message text color.
long
effects (0x08)
unsigned
This value can contain the following flags: CFE_BOLD |
long
CFE_ITALIC | CFE_UNDERLINE meaning bold, italic and
underlined text respectively.
charset (0x09)
unsigned
Message text charset.
char
pitch
and
family unsigned
(0x0A)
char
font name (0x0B)
std::string
Message text style and font family.
Message text font.
Chatroom text/talk/users Events
Event
Fields
Field type
Description
BOT_EVENT_ROOM_IN
A packet that is delivered every time the bot connects to a room, a
(0x0401)
new user connects to a room or a user's flags change. This packet is
also delivered if the plug-in is turned off and then on. When the bot
enters a room this event repeats for every user in that room.
nickname (0x01)
std::string
User's nickname.
flags (0x02)
unsigned
Flags description:
long
audio
video
female user
OP or OPPLUS
FRIEND
16
OWNER
32
punished user
64
BOT
128
privacy mode
256
ignored user
512
audio blocked
1024
PRO user
2048
age (0x03)
unsigned
User's age.
char
2013 Camshare Inc.
Page 16
Camfrog Bot 6.0 for Windows Developer's Guide
count (0x04)
int
In case of the bot logging on to a chat room this field will be set to
a value corresponding to the number of users in that room. In other
cases it will be "1".
BOT_EVENT_ROOM_TALK
(0x0403)
A room talk event.
state (0x01)
unsigned
A state value of 1 means start talk, 0 - stop talk
char
nickname (0x02)
std::string
BOT_EVENT_ROOM_MOTD
(0x0404)
The room's Message of the day.
MOTD text (0x01)
std::string
BOT_EVENT_ROOM_TOPIC
(0x0405)
Nickname is available only if state is set to "1"
Message of the day text.
The room topic.
state (0x01)
unsigned
A state value of 1 means topic on, 0 - topic off
char
topic text (0x02)
std::string
BOT_EVENT_ROOM_TEXT
(0x0406)
Topic text. Available only if state is set to "1"
Room text.
nickname (0x01)
std::string
Nickname of the massage's author. An empty nickname field means
a server message.
text (0x02)
std::string
Message text.
attributes (0x03)
unsigned
The attributes value can be set to "0". In this case the following
char
parameters are absent and the text has the default font and size.
unsigned
Message text size.
size (0x04)
char
color (0x05)
unsigned
Message text color.
long
effects (0x06)
unsigned
This value can contain the following flags: CFE_BOLD |
long
CFE_ITALIC | CFE_UNDERLINE meaning bold, italic and
underlined text respectively.
charset (0x07)
unsigned
Message text charset.
char
pitch and family (0x08) unsigned
Message text style and font family.
char
BOT_EVENT_ROOM_NAME
(0x0407)
2013 Camshare Inc.
font name (0x09)
std::string
Message text font.
room name (0x01)
std::string
Current room name (on room connection). This packet will also be
delivered if the module is turned off and then on.
Page 17
Camfrog Bot 6.0 for Windows Developer's Guide
Bot to Bot Events
Event
Fields
Field type
BOT_EVENT_BOT_2_BOT
(0x0801)
Description
A plug-in to plug-in message.
UNIQID (0x01)
SENDER
std::string
UNIQID std::string
Unique ID of the recipient plug-in.
Unique ID of the sender plug-in.
(0xFFFF)
BOT_EVENT_MODULES
(0x0802)
A plug-in can request the list of other modules.
COUNT (0x01)
int
The number of installed modules.
UNIQID (0x02 + I)
std::string
Installed modules' unique IDs. I = count.
BOT_EVENT_ROOM_TIMER
An empty message that is received every 100 msec if the bot is
(0x1001)
connected to a chat room
BOT_SIGNAL_EVENT
An empty message meaning that a signal has been sent to the bot
(0x2201)
(linux specific)
Service Channel Events
Event
Fields
Field type
BOT_EVENT_ROOM_KICK
(0x4001)
A user has been kicked from the chat room.
nickname to (0x00)
std::string
Nickname of the user who has issued the kick.
reason (0x02)
Kick reason (if stated).
std::string
Room options have been set.
option (0x00)
std::string
The option that has been changed.
nickname from (0x01) std::string
The user who has changed the option.
option value (0x02)
New value for the changed option.
std::string
BOT_EVENT_ROOM_PUNISH
(0x4003)
Nickname of the kicked user.
nickname from (0x01) std::string
BOT_EVENT_ROOM_SETOPT
(0x4002)
Description
A user has been punished.
nickname to (0x00)
std::string
Nickname of the punished user.
nickname from (0x01) std::string
Nickname of the user who has issued the punishment.
reason (0x02)
Reason for the punishment. This message consists of two parts, e.g.
std::string
"ExpireTime ReasonMessage". The expire time is separated from
the reason message by a space
expire time
BOT_EVENT_ROOM_UNPUNISH
2013 Camshare Inc.
time_t
A user has been unpunished.
Page 18
Camfrog Bot 6.0 for Windows Developer's Guide
(0x4004)
nickname to (0x00)
std::string
nickname from (0x01) std::string
BOT_EVENT_ROOM_BAN_ADD
(0x4005)
Nickname of the unpunished user.
Nickname of the user who has lifted the punishment.
A user has been banned.
ban list record (0x00)
std::string
Ban list entry for the user in question. Ban list entry format:
deny|allow nick|ip|nick_ip [nickname] [ip mask] no-expire|expire
interval
nickname from (0x01) std::string
BOT_EVENT_ROOM_BAN_REMOVE
(0x4006)
The user who has issued the ban.
A user has been unbanned.
ban list record (0x00)
std::string
Ban list entry for the user in question. Ban list entry format:
deny|allow nick|ip|nick_ip [nickname] [ip mask] no-expire|expire
interval
nickname from (0x01) std::string
BOT_EVENT_ROOM_BLOCKMIC
(0x4007)
A user's microphone has been blocked.
nickname to (0x00)
std::string
nickname from (0x01) std::string
BOT_EVENT_ROOM_UNBLOCKMIC
(0x4008)
std::string
nickname from (0x01) std::string
BOT_EVENT_ROOM_MAKEOP
Nickname of the user who has issued the block.
Nickname of the user in question.
Nickname of the user who has lifted the block.
A user has got a new role (operator, owner, friend).
nickname to (0x00)
std::string
Nickname of the promoted user.
nickname from (0x01) std::string
Nickname of the user who has issued the promotion.
new role (0x02)
User's new role.
std::string
BOT_EVENT_ROOM_DEOP
(0x4010)
Nickname of the user in question.
A user's microphone has been unblocked.
nickname to (0x00)
(0x4009)
The user who has lifted the ban.
A user's operator (owner, friend) status has been revoked.
nickname to (0x00)
std::string
Nickname of the demoted user.
nickname from (0x01) std::string
Nickname of the user who has revoked the status in question.
last role (0x02)
The status that has been revoked.
std::string
Plug-in to Bot Events
Event
Fields
Field type
Description
PLUGIN_EVENT_DISCONNECT
A command from the plug-in to the bot to disconnect from the
(0x0151)
active room and central server. An empty packet.
PLUGIN_EVENT_RESUME
A command from the plug-in to the bot to connect to the last active
(0x0152)
room. An empty packet.
2013 Camshare Inc.
Page 19
Camfrog Bot 6.0 for Windows Developer's Guide
PLUGIN_EVENT_PAUSE
A command from the plug-in to the bot to disconnect from the last
(0x0153)
active room. An empty packet.
PLUGIN_EVENT_IM
A command from the plug-in to the bot to send an instant message.
(0x0251)
nickname to (0x01)
std::string
Instant message recipient.
text (0x02)
std::string
Message text.
attributes (0x03)
unsigned
The attributes value can be set to "0". In this case the following
char
parameters are absent and the text has the default font and size.
unsigned
Message text size.
size (0x04)
char
color (0x05)
unsigned
Message text color.
long
effects (0x06)
unsigned
This value can contain the following flags: CFE_BOLD |
long
CFE_ITALIC | CFE_UNDERLINE meaning bold, italic and
underlined text respectively.
charset (0x07)
unsigned
Message text charset.
char
pitch and family (0x8) unsigned
Message text style and font family.
char
font name (0x09)
std::string
Message text font.
PLUGIN_EVENT_ROOM_TEXT
A command from the plug-in to the bot to send a message to the
(0x0451)
room.
text (0x01)
std::string
Message text.
attributes (0x02)
unsigned
The attributes value can be set to "0". In this case the following
char
parameters are absent and the text has the default font and size.
unsigned
Message text size.
size (0x03)
char
color (0x04)
unsigned
Message text color.
long
effects (0x05)
unsigned
This value can contain the following flags: CFE_BOLD |
long
CFE_ITALIC | CFE_UNDERLINE meaning bold, italic and
underlined text respectively.
charset (0x06)
unsigned
Message text charset.
char
pitch and family (0x07) unsigned
Message text style and font family.
char
font name (0x08)
PLUGIN_BOT_2_BOT
2013 Camshare Inc.
std::string
Message text font.
A command from the plug-in to the bot to send a message to
Page 20
Camfrog Bot 6.0 for Windows Developer's Guide
(0x0851)
another plug-in.
UNIQID (0x01)
std::string
Recipient plug-in.
Settings Events
Event
Fields
Field type
Description
BOT_EVENT_SETTINGS_GET
An empty packet requesting the current state XML from the plug-
(0x8001)
in.
BOT_EVENT_SETTINGS_PROCESS
xml (0x01)
std::string
An XML with the interface state after a user's action.
interface state (0x01)
std::string
An XML with the interface state after the Apply button has been
(0x8002)
BOT_EVENT_SETTINGS_APPLY
(0x8003)
pressed.
BOT_EVENT_SETTINGS_CANCEL
An empty packet meaning that the Cancel button has been
(0x8004)
pressed.
PLUGIN_SETTINGS_GET_REPLY
xml (0x01)
std::string
(0x8051)
PLUGIN_SETTINGS_STATE_REPLY
(0x8052)
The plug-in module's current state xml in reply to a
BOT_EVENT_SETTINGS_GET request.
xml (0x01)
std::string
The plug-in module's current state xml with the interface reaction
on
user's
action
(reply
to
BOT_EVENT_SETTINGS_PROCESS request).
2013 Camshare Inc.
Page 21
Camfrog Bot 6.0 for Windows Developer's Guide
Window XML Description
Form
Button
Checkbox
Radio group and radio buttons
Edit
Label
Combo box
List view
Spin edit
Group box
Folder dialog
File dialog
Examples
Form
<Form
Id = "FormId"
Width = "width"
Height = "height"
Title = "title"
Default=Some Widget>
</Form>
2013 Camshare Inc.
// unique id
// widget with default focus
Page 22
Camfrog Bot 6.0 for Windows Developer's Guide
Button
<Button
Id = "ButtonId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
> Text
// coordinate X
// coordinate Y
// clickable or not
// button text
</Button>
Checkbox
<CheckBox
Id = "CheckId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
IsChecked = "isChecked"
>Text
// checked or not
// checkbox text
</CheckBox>
2013 Camshare Inc.
Page 23
Camfrog Bot 6.0 for Windows Developer's Guide
Radio group and radio buttons
<RadioGroup>
<RadioButton
Id = "RadioId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
IsChecked = "isChecked"
>Text
</RadioButton>
<RadioButton
Id = "RadioId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
IsChecked = "isChecked"
>Text
</RadioButton>
</RadioGroup>
Edit
<Edit Id = "EditId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
>Text
</Edit>
2013 Camshare Inc.
Page 24
Camfrog Bot 6.0 for Windows Developer's Guide
Label
<Lable Id = "StaticId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
>Text
</Lable>
Combo Box
<ComboBox Id = "ComboBoxId"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
SelectedIndex = "selectedIndex">
<ComboBoxItem Index = "index1"
>ItemText1
</ComboBoxItem>
<ComboBoxItem Index = "index2"
>ItemText2
</ComboBoxItem>
</ComboBox>
2013 Camshare Inc.
Page 25
Camfrog Bot 6.0 for Windows Developer's Guide
List View
<ListView Id = "ListViewId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
IsEnabled = "isEnabled"
SelectedIndex = "selectedIndex">
<ListViewItem Index = "index1"
>ItemText1
</ListViewItem>
<ListViewItem Index = "index2"
>ItemText2
</ListViewItem>
</ListView>
Spin edit
<SpinEdit
Id = "SpingEditId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
isEnabled = "isEnabled"
MinValue = "minValue"
MaxValue = "maxValue"
Step = "step"
>CurrentValue
// minimal value
// maximal value
// step
</SpinEdit>
Group Box
<GroupBox
Id = "GroupBoxId1"
X = "x"
Y = "y"
Width = "width"
Height = "height"
>Text
</GroupBox>
2013 Camshare Inc.
Page 26
Camfrog Bot 6.0 for Windows Developer's Guide
FormState = {new,update,close}
isEnabled = {true,false}
isChecked = {true,false}
selectedIndex = {-1, 0, 1, 2, 3,...}
index = { 0, 1, 2, 3,...}
x,y widget coordinates
width, height widget size
Text widget text
ItemText item text
Folder Dialog
<Form
Id = 'FolderDialog'
RootFolder = "rootfolder"
>
</From>
// reserved Id for folder dialog
// default folder
File Dialog
<Form
Id = 'FileDialog'
Filename = "[Link]">
<Filter Mask = "FilesMask">
<FilenameExtension>Extension</FilenameExtension>
<FilenameExtension>Extension</FilenameExtension>
<FilenameExtension>Extension</FilenameExtension>
</Filter>
<Filter Mask = "OtherMask">
<FilenameExtension>Extension</FilenameExtension>
<FilenameExtension>Extension</FilenameExtension>
<FilenameExtension>Extension</FilenameExtension>
</Filter>
</Form>
[Link] - default file
FileMask - discription that will be before list of filename extension
Extension - filename extension of files in this FileMask
2013 Camshare Inc.
Page 27
Camfrog Bot 6.0 for Windows Developer's Guide
Examples
Window current state xml template
<Form Id="Form1">
<CheckBox Id="Checkid">true</CheckBox>
<ComboBox Id="ComboBox1">0</ComboBox>
<Edit Id="Edit1">InnerText</Edit>
<Button>true</Button>
<ListView Id="ListView1" SelectedIndex="1">
<ListViewItem Index="0">Item1</ListViewItem>
<ListViewItem Index="1">Item2</ListViewItem>
</ListView>
<RadioButton Id="Radioid1">true</RadioButton>
<RadioButton Id="Radioid2">false</RadioButton>
<RadioButton Id="Radioid3">false</RadioButton>
<SpinEdit Id = "SpinEditId1">Value</SpinEdit>
</Form>
Folder and file dialog state xml template
<Form Id = "FolderDialog">
<FolderPath>folderpath</FolderPath>
<DialogState>state</DialogState>
</Form>
folderpath - path of selected folder
state - {true/false} - Ok or Cancel user click
<Form Id = "FileDialog">
<FilePath>filepath</FilePath>
<DialogState>state</DialogState>
</Form>
filepath - path of selected file
state - {true/false} - Ok or Cancel user click
2013 Camshare Inc.
Page 28
Camfrog Bot 6.0 for Windows Developer's Guide
Please note: Widget IDs FolderDialog and FileDialog are reserved and you cannot assign them.
2013 Camshare Inc.
Page 29