Commit 0e3ce52a authored by Ercan Ersoy's avatar Ercan Ersoy

Update FDOSTUI

Update FDOSTUI revision to 30.
parent 0e9b6c05
This is a Bazaar control directory.
Do not change any files in this directory.
See http://bazaar.canonical.com/ for more information about Bazaar.
Bazaar-NG meta directory, format 1
parent_location = bzr://bzr.savannah.nongnu.org/fdostui/v1/
Bazaar Branch Format 7 (needs bzr 1.6)
26 markjolesen@gmail.com-20180517003032-bcohsa7p3f0g3sde
Bazaar Working Tree Format 6 (bzr 1.14)
Bazaar repository format 2a (needs bzr 1.16 or later)
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=0
row_lengths=
B+Tree Graph Index 2
node_ref_lists=0
key_elements=1
len=1
row_lengths=1
x @bdX yͱkH͙\
v<WmsK/%<$K CRxg
\ No newline at end of file
......@@ -42,10 +42,9 @@ specific to Open Watcom are used throughout the code.
\subsection sect_16bit 16-bit Real Mode
The library needs to be compiled in the medium memory model (big code,
small data). This is where the code model is large and data model
is small. Currently, a large data model will not work because some
assembler routines such as ::screen_puts require near pointers.
The library can not be compiled in the small, compact or huge memory
models. Use either the medium (mm) or large (ml) memory model. The
default memory model is medium.
To compile, change into the make directory of FDOSTUI, and type
"wmake -f owd16.mak."
......
......@@ -29,10 +29,11 @@
\param[in] i_len_x x length of widget
\param[in] i_len_y y length of widget
\returns none
\see file_dialog_open
*/
/*!
\fn virtual filedlg::~filedlg()
\fn virtual filedlg::~filedlg()
\brief destructor
\returns none
*/
......
/*
INPDLG.DOX
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
/*! \file inpdlg.hpp
\brief contains input dialog class
*/
/*! \class inputdlg inpdlg.hpp
\brief Allows a user to input a value
*/
/*!
\fn inputdlg::inputdlg(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y)
\brief constructor
\param[in] i_pos_x x position to place widget
\param[in] i_pos_y y position to place widget
\param[in] i_len_x x length of widget
\param[in] i_len_y y length of widget
\returns none
\see popup_input
*/
/*!
\fn virtual inputdlg::~inputdlg()
\brief destructor
\returns none
*/
/*!
\fn unsigned char* inputdlg::get_value() const
\brief get user input value
\returns buffer containing user input. caller must free.
*/
/*!
\fn void inputdlg::set_prompt(
unsigned char const* i_prompt)
\brief set user prompt
\param[in] i_prompt description of value to be entered by user
\returns none
*/
/*!
\fn void inputdlg::set_value(
unsigned char const* i_value)
\brief set default value
\param[in] i_value default value
\returns none
*/
/*!
\var inputdlg::m_label_prompt
prompt label
*/
/*!
\var inputdlg::m_entry_value
entry widget for user value
*/
/*!
\var inputdlg::m_button_cancel
cancel button
*/
/*!
\var inputdlg::m_button_ok
ok button
*/
......@@ -12,19 +12,19 @@
\mainpage FreeDOS Text User Interface Library
\section intro Introduction
\section section_intro Introduction
FDOSTUI is free source code for building text user interfaces.
The language used is C++. It is inspired by the Fast Light
Toolkit (<a href="http://www.fltk.org/">FLTK</a>).
\section Project
\section section_project Project
<a href="https://savannah.nongnu.org/projects/fdostui">FDOSTUI</a>
project is hosted on
<a href="https://savannah.nongnu.org/">Savannah</a>.
\subsection Source Code
\subsection subsection_code Source Code
The source code can be viewed online at
<a href="http://bzr.savannah.gnu.org/lh/fdostui">
......@@ -43,12 +43,22 @@ use the following bzr command:
\subpage page_hello
\section Configuration
\section section_config Configuration
\subpage page_theme
\section Licensing
\section section_license Licensing
\subpage page_licensing
\section section_news News
\subsection date_05162018 May 16, 2018
Beginning with revision 26, the 16-bit library supports the large memory
model. Consequently, the changes affect the binary interface. This
means that applications and the library will need to be recompiled.
By default, the makefile is setup to use the medium model. Manual edit
of the makefile is required to compile the library in the large model.
*/
......@@ -12,6 +12,20 @@
\brief common dialog boxes
*/
/*!
\fn unsigned char* popup_input(
unsigned char const* i_title,
unsigned char const* i_prompt,
unsigned char const* i_default)
\brief popup an input dialog
\param[in] i_title string to display in title bar
\param[in] i_prompt description of value to be entered by user
\param[in] i_default default value
\returns 0 user cancelled
\returns !0 buffer containing user input. caller must free.
\see inputdlg
*/
/*!
\fn enum event_response popup_menu(
struct menuitem * io_menu,
......
......@@ -204,7 +204,7 @@ The draw.h module contians clipping routines.
\fn void screen_puts(
int const i_col,
int const i_row,
unsigned char const* i_string,
unsigned char const __FAR* i_string,
unsigned int const i_length,
enum foreground const i_fcolor,
enum background const i_bcolor)
......
/*
INPDLG.HPP
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States
*/
#ifndef __inpdlg_hpp__
#include "window.hpp"
#include "label.hpp"
#include "entry.hpp"
#include "button.hpp"
class inputdlg : public window
{
public:
inputdlg(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y);
virtual
~inputdlg();
unsigned char*
get_value() const;
void
set_prompt(
unsigned char const* i_prompt);
void
set_value(
unsigned char const* i_value);
protected:
label* m_label_prompt;
entry* m_entry_value;
button* m_button_cancel;
button* m_button_ok;
private:
inputdlg();
inputdlg(
const inputdlg&);
inputdlg&
operator=(inputdlg const&);
};
inline void
inputdlg::set_prompt(
unsigned char const* i_prompt)
{
(*m_label_prompt).set_text(i_prompt);
return;
}
inline void
inputdlg::set_value(
unsigned char const* i_value)
{
(*m_entry_value).set_text(i_value);
return;
}
#define __inpdlg_hpp__
#endif
......@@ -11,6 +11,12 @@
#include "menu.hpp"
extern unsigned char*
popup_input(
unsigned char const* i_title,
unsigned char const* i_prompt,
unsigned char const* i_default);
extern enum event_response
popup_menu(
struct menuitem * io_menu,
......
/*
STRINGS.H
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
#ifndef __strings_h__
#ifdef __cplusplus
extern "C" {
#endif
#define TEXT_SIZE_CANCEL 16
#define TEXT_SIZE_DRIVES 16
#define TEXT_SIZE_ENTER_VALUE 32
#define TEXT_SIZE_FILES 16
#define TEXT_SIZE_FILTER 16
#define TEXT_SIZE_HIDDEN 16
#define TEXT_SIZE_NAME 16
#define TEXT_SIZE_OK 16
#define TEXT_SIZE_OPEN_FILE 24
#define TEXT_SIZE_READ_ONLY 24
#define TEXT_SIZE_REFRESH 16
#define TEXT_SIZE_SYSTEM 16
#define TEXT_SIZE_UNABLE_TO_CHANGE_DIRECTORY 64
extern unsigned char _text_cancel[TEXT_SIZE_CANCEL];
extern unsigned char _text_drives[TEXT_SIZE_DRIVES];
extern unsigned char _text_enter_value[TEXT_SIZE_ENTER_VALUE];
extern unsigned char _text_files[TEXT_SIZE_FILES];
extern unsigned char _text_filter[TEXT_SIZE_FILTER];
extern unsigned char _text_hidden[TEXT_SIZE_HIDDEN];
extern unsigned char _text_name[TEXT_SIZE_NAME];
extern unsigned char _text_ok[TEXT_SIZE_OK];
extern unsigned char _text_open_file[TEXT_SIZE_OPEN_FILE];
extern unsigned char _text_read_only[TEXT_SIZE_READ_ONLY];
extern unsigned char _text_refresh[TEXT_SIZE_REFRESH];
extern unsigned char _text_system[TEXT_SIZE_SYSTEM];
extern unsigned char _text_unable_to_change_directory[TEXT_SIZE_UNABLE_TO_CHANGE_DIRECTORY];
#ifdef __cplusplus
}
#endif
#define __strings_h__
#endif
/*
TREE.HPP
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
#ifndef __tree_hpp__
#include "treeitem.hpp"
#include "scrllbar.hpp"
class tree : public widget
{
public:
typedef void (*signal_selected_t)(
tree const*const i_tree,
void* io_user_data);
tree(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y);
void
attach(
treeitem*const io_root);
virtual void
draw() const;
virtual
~tree();
virtual enum event_response
event_key(
struct event_key const& i_event);
virtual enum event_response
event_mouse(
struct event_mouse const& i_event);
virtual void
move(
int const i_pos_x,
int const i_pos_y);
virtual void
resize(
unsigned int const i_len_x,
unsigned int const i_len_y);
protected:
treeitem* m_root;
treeitem* m_selected;
signal_selected_t m_signal_selected;
scrollbar m_horizontal;
scrollbar m_vertical;
private:
tree();
tree(
const tree&);
tree&
operator=(tree const&);
int
draw(
treeitem*const io_item,
int const i_pos_x,
int const i_pos_y) const;
void
emit_selected();
bool
event_hit(
treeitem*const io_item,
unsigned int const i_pos_y);
void
key_down();
void
key_up();
void
scrollbar_configure();
void
scrollbar_configure(
unsigned int& io_height,
unsigned int& io_width,
treeitem const& i_item,
unsigned int const i_pos_y);
};
inline void
tree::attach(
treeitem*const io_root)
{
delete m_root;
m_root= io_root;
m_selected= io_root;
if (m_root)
{
treeitem::set_links(m_root, 0, 0, 0);
}
scrollbar_configure();
return;
}
inline void
tree::emit_selected()
{
if (m_signal_selected && m_selected)
{
(*m_signal_selected)(this, (*m_selected).m_user_data);
}
return;
}
#define __tree_hpp__
#endif
/*
TREE.HPP
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
#ifndef __tree_hpp__
#include "treeitem.hpp"
#include "scrllbar.hpp"
class tree : public widget
{
public:
typedef void (*signal_selected_t)(
tree const*const i_tree,
void* io_user_data);
tree(
int const i_pos_x,
int const i_pos_y,
unsigned int const i_len_x,
unsigned int const i_len_y);
void
attach(
treeitem*const io_root);
virtual void
draw() const;
virtual
~tree();
virtual enum event_response
event_key(
struct event_key const& i_event);
virtual enum event_response
event_mouse(
struct event_mouse const& i_event);
virtual void
move(
int const i_pos_x,
int const i_pos_y);
virtual void
resize(
unsigned int const i_len_x,
unsigned int const i_len_y);
protected:
treeitem* m_root;
treeitem* m_selected;
signal_selected_t m_signal_selected;
scrollbar m_horizontal;
scrollbar m_vertical;
private:
tree();
tree(
const tree&);
tree&
operator=(tree const&);
int
draw(
treeitem*const io_item,
int const i_pos_x,
int const i_pos_y) const;
void
emit_selected();
bool
event_hit(
treeitem*const io_item,
unsigned int const i_pos_y);
void
key_down();
void
key_up();
void
scrollbar_configure();
void
scrollbar_configure(
unsigned int& io_height,
unsigned int& io_width,
treeitem const& i_item,
unsigned int const i_pos_y);
};
inline void
tree::attach(
treeitem*const io_root)
{
delete m_root;
m_root= io_root;
m_selected= io_root;
if (m_root)
{
treeitem::set_links(m_root, 0, 0, 0);
}
scrollbar_configure();
return;
}
inline void
tree::emit_selected()
{
if (m_signal_selected && m_selected)
{
(*m_signal_selected)(this, (*m_selected).m_user_data);
}
return;
}
#define __tree_hpp__
#endif
/*
TREEITEM.H
License CC0 PUBLIC DOMAIN
To the extent possible under law, Mark J. Olesen has waived all copyright
and related or neighboring rights to FDOSTUI Library. This work is published
from: United States.
*/
#ifndef __treeitem_hpp__
#include "array.h"
#include "box.h"
class treeitem
{
public:
treeitem(
unsigned char const* i_str,
void *const io_user_data= 0);
bool
add(
unsigned char const* i_str,
void *const io_user_data= 0);
bool
add(
treeitem*const io_item);
treeitem*const
next() const;
treeitem*const