Merge branch 'master' into iku

This commit is contained in:
Antti Harri 2011-07-10 16:16:23 +03:00
commit 02a5a2008d
27 changed files with 687 additions and 135 deletions

View file

@ -11,6 +11,12 @@ h1 {
font-size: 150%;
}
.title {
font-size: 150%;
font-weight: bold;
margin: 10px 2px;
}
h2 {
font-size: 120%;
}
@ -53,13 +59,13 @@ caption {
}
span.legend {
font-size: 70%;
text-align: center;
font-size: 70%;
text-align: center;
}
h3.version {
font-size: 90%;
text-align: center;
font-size: 90%;
text-align: center;
}
div.qindex, div.navtab{
@ -119,17 +125,17 @@ a.elRef {
a.code {
color: #4444cc;
font-weight: bold;
/* font-weight: bold;*/
}
a.code:visited {
color: #444488;
font-weight: bold;
/* font-weight: bold;*/
}
a.codeRef {
color: #6666ff;
font-weight: bold;
/* font-weight: bold;*/
}
/* @end */
@ -166,6 +172,7 @@ div.ah {
border-radius: 0.5em;
-webkit-border-radius: .5em;
-moz-border-radius: .5em;
box-shadow: 2px 2px 3px #999;
-webkit-box-shadow: 2px 2px 3px #999;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 2px 2px 2px;
background-image: -webkit-gradient(linear, left top, left bottom, from(#eee), to(#000),color-stop(0.3, #444));
@ -197,10 +204,10 @@ div.contents {
}
/* inline MSC graphs? */
.contents div img {
/*.contents div img {
border: 2px solid #737b9c;
}
*/
td.indexkey {
background-color: #262833;
font-weight: bold;
@ -234,9 +241,9 @@ img.formulaInl {
div.center {
text-align: center;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
margin-top: 0px;
margin-bottom: 0px;
padding: 0px;
}
div.center img {
@ -378,12 +385,16 @@ table.memberdecls {
}
.memItemLeft, .memTemplItemLeft {
white-space: nowrap;
white-space: nowrap;
}
.memItemRight {
width: 100%;
}
.memTemplParams {
color: #465079;
white-space: nowrap;
white-space: nowrap;
}
/* @end */
@ -408,6 +419,10 @@ table.memberdecls {
padding: 2px;
}
.mempage {
width: 100%;
}
.memitem {
padding: 0;
margin-bottom: 10px;
@ -423,44 +438,50 @@ table.memberdecls {
}
.memproto {
border-top: 1px solid #A0A8C7;
border-left: 1px solid #A0A8C7;
border-right: 1px solid #A0A8C7;
padding: 6px 0px 6px 0px;
color: #ffffff;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topleft: 8px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
/* background-image:url('nav_f.png');*/
background-repeat:repeat-x;
background-color: #737b9c;
border-top: 1px solid #A0A8C7;
border-left: 1px solid #A0A8C7;
border-right: 1px solid #A0A8C7;
padding: 6px 0px 6px 0px;
color: #ffffff;
font-weight: bold;
text-shadow: 0px 1px 1px rgba(0, 0, 0, 0.9);
/* opera specific markup */
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
border-top-right-radius: 8px;
border-top-left-radius: 8px;
/* firefox specific markup */
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
-moz-border-radius-topright: 8px;
-moz-border-radius-topleft: 8px;
/* webkit specific markup */
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
-webkit-border-top-right-radius: 8px;
-webkit-border-top-left-radius: 8px;
/* background-image:url('nav_f.png');*/
background-repeat:repeat-x;
background-color: #737b9c;
}
.memdoc {
border-bottom: 1px solid #737b9c;
border-left: 1px solid #737b9c;
border-right: 1px solid #737b9c;
padding: 2px 5px;
background-color: #262833;
border-top-width: 0;
/* firefox specific markup */
-moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
background-image: -moz-linear-gradient(center top, #FFFFFF 0%, #FFFFFF 60%, #F6F6F9 95%, #ECEDF3);
/* webkit specific markup */
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
background-image: -webkit-gradient(linear,center top,center bottom,from(#FFFFFF), color-stop(0.6,#FFFFFF), color-stop(0.60,#FFFFFF), color-stop(0.95,#F6F6F9), to(#ECEDF3));
border-bottom: 1px solid #737b9c;
border-left: 1px solid #737b9c;
border-right: 1px solid #737b9c;
padding: 2px 5px;
background-color: #262833;
border-top-width: 0;
/* opera specific markup */
border-bottom-left-radius: 8px;
border-bottom-right-radius: 8px;
box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
/* firefox specific markup */
-moz-border-radius-bottomleft: 8px;
-moz-border-radius-bottomright: 8px;
-moz-box-shadow: rgba(0, 0, 0, 0.15) 5px 5px 5px;
/* webkit specific markup */
-webkit-border-bottom-left-radius: 8px;
-webkit-border-bottom-right-radius: 8px;
-webkit-box-shadow: 5px 5px 5px rgba(0, 0, 0, 0.15);
}
.paramkey {
@ -475,14 +496,40 @@ table.memberdecls {
}
.paramname {
color: #406;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
color: white;
white-space: nowrap;
}
.memproto .paramname {
color: #406;
text-shadow: 0px 1px 1px rgba(255, 255, 255, 0.9);
}
.paramname em {
/* font-style: normal;*/
}
/* NEW doxygen 1.7.4 */
.params, .retval, .exception, .tparams {
border-spacing: 6px 2px;
}
.params .paramname, .retval .paramname {
font-weight: bold;
vertical-align: top;
}
.params .paramtype {
font-style: italic;
vertical-align: top;
}
.params .paramdir {
font-family: "Courier New", Courier, monospace;
vertical-align: top;
}
/* @end */
/* @group Directory (tree) */
@ -619,12 +666,13 @@ table.doxtable th {
.navpath ul
{
font-size: 11px;
background-image:url('tab_b.png');
/* background-image:url('tab_b.png');*/
background-color: #737b9c;
background-repeat:repeat-x;
height:30px;
line-height:30px;
color:#808BB5;
border:solid 1px #bdcaff;
border-top:solid 2px #bec3d9;
overflow:hidden;
margin:0px;
padding:0px;
@ -642,6 +690,7 @@ table.doxtable th {
color:#4b5166
}
/* OLD
.navpath a
{
height:32px;
@ -655,6 +704,39 @@ table.doxtable th {
color:#4b5166
}
.navpath li.footer
{
display: none;
}
/* NEW doxygen 1.7.4 */
.navpath li.navelem a
{
height:32px;
display:block;
text-decoration: none;
outline: none;
}
.navpath li.navelem a:hover
{
color:white;
}
.navpath li.footer
{
list-style-type:none;
float:right;
padding-left:10px;
padding-right:15px;
background-image:none;
background-repeat:no-repeat;
background-position:right;
color:#4b5166;
font-size: 8pt;
}
/* end NEW */
div.summary
{
float: right;
@ -669,10 +751,25 @@ div.summary a
white-space: nowrap;
}
/* NEW doxygen 1.7.4 */
div.ingroups
{
font-size: 8pt;
padding-left: 5px;
width: 50%;
text-align: left;
}
div.ingroups a
{
white-space: nowrap;
}
/* end NEW */
div.header
{
/* background-image:url('nav_h.png');
background-repeat:repeat-x;*/
/* background-image:url('nav_h.png');
background-repeat:repeat-x;*/
background-color: #737b9c;
margin: 0px;
border-bottom: 2px solid #bdcaff;
@ -683,3 +780,117 @@ div.headertitle
padding: 5px 5px 5px 10px;
}
/* NEW doxygen 1.7.4 */
dl
{
padding: 0 0 0 10px;
}
dl.note, dl.warning, dl.attention, dl.pre, dl.post, dl.invariant, dl.deprecated, dl.todo, dl.test, dl.bug
{
border-left:4px solid;
padding: 0 0 0 6px;
}
dl.note
{
border-color: #D0C000;
}
dl.warning, dl.attention
{
border-color: #FF0000;
}
dl.pre, dl.post, dl.invariant
{
border-color: #00D000;
}
dl.deprecated
{
border-color: #505050;
}
dl.todo
{
border-color: #00C0E0;
}
dl.test
{
border-color: #3030E0;
}
dl.bug
{
border-color: #C08050;
}
#projectlogo
{
text-align: center;
vertical-align: bottom;
border-collapse: separate;
}
#projectlogo img
{
border: 0px none;
}
#projectname
{
font: 300% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 2px 0px;
}
#projectbrief
{
font: 120% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#projectnumber
{
display:none;
font: 50% Tahoma, Arial,sans-serif;
margin: 0px;
padding: 0px;
}
#titlearea
{
padding: 0px;
margin: 0px;
width: 100%;
border-bottom: 2px solid #bec3d9; /*#9BA3C4;#bec3d9;*/
background-color: #737b9c;
}
.image
{
text-align: center;
}
.dotgraph
{
text-align: center;
}
.mscgraph
{
text-align: center;
}
.caption
{
font-weight: bold;
}
/* end NEW */
#nav-tree {
background: black;
}

View file

@ -32,7 +32,7 @@ size is the number of data bytes in the message (if >= 0) or a special flag:
be the empty string (""), otherwise it contains the new name of the
file. See -2.
QF #defines for the above values:
QF \#defines for the above values:
\verbatim
#define DL_NOFILE -1
#define DL_RENAME -2

View file

@ -256,8 +256,10 @@ PF_newstr (progs_t *pr)
dstring_copystr (dstr, s);
if (pr->pr_argc > 1 && P_FLOAT (pr, 1) > dstr->size) {
dstr->size = P_FLOAT (pr, 1);
int s = dstr->size;
dstr->size = P_FLOAT (pr, 1) + 1;
dstring_adjust (dstr);
memset (dstr->str + s, dstr->size - s, 0);
}
R_STRING (pr) = i;

View file

@ -33,7 +33,7 @@ menu_src= \
CrosshairCvar.r CrosshairView.r CvarColor.r CvarColorView.r \
CvarObject.r CvarRange.r CvarRangeView.r CvarString.r CvarStringView.r \
CvarToggle.r CvarToggleView.r \
MenuGroup.r MouseToggle.r ProxyView.r RunToggle.r
MenuGroup.r MouseToggle.r ProxyView.r RunToggle.r SubMenu.r
%.qfo: %.r
$(QFCC) $(QCFLAGS) $(QCPPFLAGS) -c -o $@ $<
@ -52,7 +52,7 @@ EXTRA_DIST= $(menu_src) \
CrosshairCvar.h CrosshairView.h CvarColor.h CvarColorView.h CvarObject.h \
CvarRange.h CvarRangeView.h CvarString.h CvarStringView.h \
CvarToggle.h CvarToggleView.h Frame.h HUD.h \
MenuGroup.h MouseToggle.h ProxyView.h RunToggle.h client_menu.h \
MenuGroup.h MouseToggle.h ProxyView.h RunToggle.h SubMenu.h client_menu.h \
controls_o.h menu.h options.h options_util.h plistmenu.h servlist.h \
menu.plist
CLEANFILES= *.dat *.sym *.gz *.qfo

View file

@ -3,13 +3,33 @@
#include "gui/Group.h"
/** A group of views for use as a menu.
A menu may consist of decorations and actual menu items. For correct
results, the decoration views must be added before the menu item views.
*/
@interface MenuGroup : Group
{
int base;
int current;
int base; ///< The index of the first menu item.
int current; ///< The currently selected menu item.
}
-(void)setBase:(int)b;
/** Set the index of the first menu item.
\param b The index of the first menu item.
*/
-(void) setBase: (int) b;
/** Select the next menu item.
Wraps back to the base menu item if the current menu item is the last.
*/
-(void) next;
/** Select the previous menu item.
Wraps to the last menu item if the current menu item is the base item.
*/
-(void) prev;
@end

14
ruamoko/cl_menu/SubMenu.h Normal file
View file

@ -0,0 +1,14 @@
#ifndef __SubMenu_h
#define __SubMenu_h
#include "gui/View.h"
@interface SubMenu : View
{
View *title;
string menu_name;
}
-(id)initWithBounds:(Rect)aRect title:(View*)aTitle menu:(string)name;
@end
#endif//__SubMenu_h

39
ruamoko/cl_menu/SubMenu.r Normal file
View file

@ -0,0 +1,39 @@
#include "key.h"
#include "menu.h"
#include "SubMenu.h"
@implementation SubMenu
-(id)initWithBounds:(Rect)aRect title:(View *)aTitle menu:(string)name
{
self = [super initWithBounds:aRect];
if (!self)
return self;
title = aTitle;
menu_name = name;
return self;
}
- (int) keyEvent:(int)key unicode:(int)unicode down:(int)down
{
if (key == QFK_RETURN) {
Menu_SelectMenu (menu_name);
return 1;
}
return 0;
}
- (void) draw
{
[title draw];
}
- (void) setBasePosFromView: (View *) aview
{
[super setBasePosFromView:aview];
[title setBasePosFromView:self];
}
@end

View file

@ -1,7 +1,7 @@
#ifndef __controls_o_h
#define __controls_o_h
@extern void () MENU_control_binding;
@extern void () load_keybindings;
@extern void MENU_control_binding (void);
@extern void load_keybindings (void);
#endif//__controls_o_h

View file

@ -1,28 +1,27 @@
#ifndef __menu_h
#define __menu_h
@extern void (int x, int y, string text) Menu_Begin;
@extern void (int val) Menu_FadeScreen;
@extern void (int (int x, int y) func) Menu_Draw;
@extern void (void () func) Menu_EnterHook;
@extern void (void () func) Menu_LeaveHook;
@extern void (int x, int y, string name) Menu_Pic;
@extern void (int x, int y, string name, int srcx, int srcy,
int width, int height) Menu_SubPic;
@extern void (int x, int y, string name) Menu_CenterPic;
@extern void (int x, int y, string name, int srcx, int srcy,
int width, int height) Menu_CenterSubPic;
@extern void (int x, int y, string text,
int (string text, int key) func,
int allkeys) Menu_Item;
@extern void (void (int x, int y) func) Menu_Cursor;
@extern void (int (int key, int unicode, int down)
func) Menu_KeyEvent;
@extern void () Menu_End;
@extern void (string name) Menu_TopMenu;
@extern void (string name) Menu_SelectMenu;
@extern void (int () func) Menu_SetQuit;
@extern void () Menu_Quit;
@extern int () Menu_GetIndex;
@extern void Menu_Begin (int x, int y, string text);
@extern void Menu_FadeScreen (int val);
@extern void Menu_Draw (int (func)(int x, int y));
@extern void Menu_EnterHook (void (func)(void));
@extern void Menu_LeaveHook (void (func)(void));
@extern void Menu_Pic (int x, int y, string name);
@extern void Menu_SubPic (int x, int y, string name, int srcx, int srcy,
int width, int height);
@extern void Menu_CenterPic (int x, int y, string name);
@extern void Menu_CenterSubPic (int x, int y, string name, int srcx, int srcy,
int width, int height);
@extern void Menu_Item (int x, int y, string text,
int (func)(string text, int key),
int allkeys);
@extern void Menu_Cursor (void (func)(int x, int y));
@extern void Menu_KeyEvent (int (func)(int key, int unicode, int down));
@extern void Menu_End (void);
@extern void Menu_TopMenu (string name);
@extern void Menu_SelectMenu (string name);
@extern void Menu_SetQuit (int (func)(void));
@extern void Menu_Quit (void);
@extern int Menu_GetIndex (void);
#endif//__menu_h;

View file

@ -41,12 +41,20 @@
rect = "[54, 50, 64, 8]";
},
{
Class = Text;
Class = SubMenu;
Messages = (
(initWithBounds:, $rect),
(setText:, "\"Bindings\"")
(initWithBounds:title:menu:, $rect, $title,
"\"Bindings\""),
);
rect = "[70, 60, 64, 8]";
title = {
Class = Text;
Messages = (
(initWithBounds:, $rect),
(setText:, "\"Bindings\"")
);
rect = "[0, 0, 64, 8]";
};
},
{
Class = CvarToggleView;

View file

@ -1,7 +1,7 @@
#ifndef __options_h
#define __options_h
@extern void () MENU_options;
@extern void (int x, int y, int spacing, string label, string valstr) draw_val_item;
@extern void MENU_options (void);
@extern void draw_val_item (int x, int y, int spacing, string label, string valstr);
#endif//__options_r

View file

@ -199,7 +199,7 @@ DRAW_control_options =
[control_options setBasePos:x y:y];
[control_options draw];
return 1;
return 0;
};
int (int key, int unicode, int down)
@ -227,8 +227,8 @@ MENU_control_options (PLItem *plist)
control_options = ret.pointer_val;
}
MENU_control_binding (); //FIXME how to hook in the bindings menu?
Menu_End ();
//MENU_control_binding (); FIXME how to hook in the bindings menu?
};
/***********************************************

View file

@ -1,10 +1,10 @@
#ifndef __options_util_h
#define __options_util_h
@extern void (int x, int y) opt_cursor;
@extern void (int x, int y, int spacing, string spacechar, string label, string valstr) draw_item;
@extern void (int x, int y, int spacing, string label, string valstr) draw_val_item;
@extern int (float min, float max, float val) to_percentage;
@extern float (float min, float max, float step, float val, int cntflag) min_max_cnt;
@extern void opt_cursor (int x, int y);
@extern void draw_item (int x, int y, int spacing, string spacechar, string label, string valstr);
@extern void draw_val_item (int x, int y, int spacing, string label, string valstr);
@extern int to_percentage (float min, float max, float val);
@extern float min_max_cnt (float min, float max, float step, float val, int cntflag);
#endif//__options_util_h

View file

@ -1,6 +1,6 @@
#ifndef __servlist_h
#define __servlist_h
@extern void () server_list_menu;
@extern void server_list_menu (void);
#endif//__servlist_h

View file

@ -32,11 +32,6 @@
return self;
}
- (void) moveTo: (int)x y:(int)y
{
[self setBasePos: x y:y];
}
- (void) setBasePos: (int) x y: (int) y
{
[super setBasePos: x y:y];

View file

@ -2,18 +2,18 @@
#include "gui/InputLine.h"
#include "gui/Rect.h"
inputline_t (int lines, int size, int prompt) InputLine_Create = #0;
inputline_t InputLine_Create (int lines, int size, int prompt) = #0;
void InputLine_SetPos (inputline_t il, int x, int y) = #0;
void InputLine_SetCursor (inputline_t il, int cursorr) = #0;
@overload void InputLine_SetEnter (inputline_t il, void (f)(string, void*), void *data) = #0;
@overload void InputLine_SetEnter (inputline_t il, IMP imp, id obj, SEL sel) = #0;
void (inputline_t il, int width) InputLine_SetWidth = #0;
void (inputline_t il) InputLine_Destroy = #0;
void (inputline_t il, int size) InputLine_Clear = #0;
void (inputline_t il, int ch) InputLine_Process = #0;
void (inputline_t il) InputLine_Draw = #0;
void (inputline_t il, string str) InputLine_SetText = #0;
string (inputline_t il) InputLine_GetText = #0;
void InputLine_SetWidth (inputline_t il, int width) = #0;
void InputLine_Destroy (inputline_t il) = #0;
void InputLine_Clear (inputline_t il, int size) = #0;
void InputLine_Process (inputline_t il, int ch) = #0;
void InputLine_Draw (inputline_t il) = #0;
void InputLine_SetText (inputline_t il, string str) = #0;
string InputLine_GetText (inputline_t il) = #0;
@implementation InputLine

View file

@ -3,17 +3,44 @@
#include "View.h"
/** \addtogroup gui */
//@{
@class Array;
/** A group of logically realted views.
The sub-views are all positioned relative to the group's origin.
Sub-views may be other groups.
The order in which views are added determines the draw and event handling
order.
\todo Events are not handled.
*/
@interface Group : View
{
Array *views;
}
- (void) dealloc;
/** Add a view to the group.
\param aView The view to be added.
\return The added view.
*/
- (View*) addView: (View*)aView;
/** Add an array of views to the group.
The views will be appened to any already existing sub-views, maintaining
the order of the views in the array.
\param viewlist The array of views to be added.
\return self
*/
- (id) addViews: (Array*)viewlist;
- (void) moveTo: (int)x y:(int)y;
- (void) draw;
@end
//@}
#endif//__ruamoko_gui_Group_h

View file

@ -3,38 +3,187 @@
#include "View.h"
struct _inputline_t {}; // opaque type :)
/** \defgroup inputline Low level intputline interface.
\ingroup gui
Interface functions to the engine implementation.
*/
//@{
/** Opaque handle to an inputline.
\warning Not a real pointer. Dereferencing leads to nasal-dragon
infested lands.
*/
typedef struct _inputline_t *inputline_t;
@extern inputline_t (int lines, int size, int prompt) InputLine_Create;
@extern void InputLine_SetPos (inputline_t il, int x, int y);
@extern void InputLine_SetCursor (inputline_t il, int cursorr);
@extern @overload void InputLine_SetEnter (inputline_t il, void (f)(string, void*), void *data);
@extern @overload void InputLine_SetEnter (inputline_t il, IMP imp, id obj, SEL sel);
@extern void (inputline_t il, int width) InputLine_SetWidth;
@extern void (inputline_t il) InputLine_Destroy;
@extern void (inputline_t il, int save) InputLine_Clear;
@extern void (inputline_t il, int ch) InputLine_Process;
@extern void (inputline_t il) InputLine_Draw;
@extern void (inputline_t il, string str) InputLine_SetText;
@extern string (inputline_t il) InputLine_GetText;
/** Create a new inputline.
The inputline will be positioned at 0,0 with the cursor enabled.
\param lines The number of lines of input history.
\param size The maximum length of the input string.
\param prompt The prompt to display.
\return The inputline handle.
*/
@extern inputline_t InputLine_Create (int lines, int size, int prompt);
/** Set the visual location of the input line.
The coordinates are defined by the display system (pixels for clients,
character cells for servers).
\param il The inputline handle.
\param x The X coordinate of the upper-left corner of the inputline.
\param y The Y coordinate of the upper-left corner of the inputline.
*/
@extern void InputLine_SetPos (inputline_t il, int x, int y);
/** Turn the inputline's cursor on or off.
\param il The inputline handle.
\param cursor 0 turns off the cursor, non-0 turns it on.
*/
@extern void InputLine_SetCursor (inputline_t il, int cursor);
/** Set the callback function for when the enter key is pressed.
\param il The inputline handle.
\param f The callback function. The first parameter is the text
of the input line and the second is \a data.
\param data Pointer to a data block to be passed to the callback
function.
*/
@extern @overload void InputLine_SetEnter (inputline_t il, void (f)(string, void*), void *data);
/** Set the callback method for when the enter key is pressed.
The method will be called with a single string parameter representing the
text of the inputline. eg:
-enter: (string) text;
\param il The inputline handle.
\param imp The implementation of the method.
\param obj The object receiving the message.
\param sel The selector representing the message.
*/
@extern @overload void InputLine_SetEnter (inputline_t il, IMP imp, id obj, SEL sel);
/** Set the visible width of the inputline.
\param il The inputline handle.
\param width The width of the inputline in character cells.
*/
@extern void InputLine_SetWidth (inputline_t il, int width);
/** Destroy an inputline, freeing its resources.
\param il The inputline handle.
*/
@extern void InputLine_Destroy (inputline_t il);
/** Clear the inputline's text.
\param il The inputline handle.
\param save If true, the current text will be saved to the history.
*/
@extern void InputLine_Clear (inputline_t il, int save);
/** Process a keystroke.
\param il The inputline handle.
\param key The Quake key code for the key press.
*/
@extern void InputLine_Process (inputline_t il, int key);
/** Draw the inputline to the screen.
Drawing is handled by the engine.
\param il The inputline handle.
*/
@extern void InputLine_Draw (inputline_t il);
/** Set the text of the inputline
\param il The inputline handle.
\param str The text to which the inputline will be set.
*/
@extern void InputLine_SetText (inputline_t il, string str);
/** Retrieve the text of the inputline.
\param il The inputline handle.
\return The current text of the intputline.
*/
@extern string InputLine_GetText (inputline_t il);
//@}
/** \addtogroup gui */
//@{
/** Class representation of the low-level inputline objects.
*/
@interface InputLine: View
{
inputline_t il;
inputline_t il; ///< The inputline handle.
}
/** Initialize.
\note The size of the bounds parameter is interpreted differently to
usual. The width is in character cells and the hight is used
for the number of lines of history.
\param aRect The bounds of the inputline.
\param char The prompt character.
\todo the size thing is stupid and broken.
*/
- (id) initWithBounds: (Rect)aRect promptCharacter: (int)char;
- (void) setBasePosFromView: (View *) view;
- (void) setWidth: (int)width;
- (void) setEnter: obj message:(SEL) msg;
- (void) cursor: (BOOL)cursor;
- (void) draw;
/** Set the visible width of the inputline.
\param width The visible width of the inputline.
\todo the size thing is stupid and broken.
*/
- (void) setWidth: (int)width;
/** Set up the XXX for when the enter key is pressed.
The method will be called with a single string parameter representing the
text of the inputline. eg:
-enter: (string) text;
\param obj The object receiving the message.
\param sel The selector representing the message.
\todo -(void) set[X]Action: (SEL)aSelector;
\todo -(void) setTarget: (id)ahnObject;
*/
- (void) setEnter: obj message:(SEL) msg;
/** Turn the inputline's cursor on or off.
\param cursor 0 turns off the cursor, non-0 turns it on.
*/
- (void) cursor: (BOOL)cursor;
/** Process a keystroke.
\param key The Quake key code for the key press.
*/
- (void) processInput: (int)key;
/** Set the text of the inputline
\param text The text to which the inputline will be set.
*/
- (id) setText: (string)text;
/** Retrieve the text of the inputline.
\return The current text of the intputline.
*/
- (string) text;
@end
@ -43,16 +192,65 @@ typedef struct _inputline_t *inputline_t;
{
InputLine *input_line;
}
/** Initialize.
\note The size of the bounds parameter is interpreted differently to
usual. The width is in character cells and the hight is used
for the number of lines of history.
\param aRect The bounds of the inputline.
\param char The prompt character.
\todo the size thing is stupid and broken.
*/
- (id) initWithBounds: (Rect)aRect promptCharacter: (int)char;
/** Set the visible width of the inputline.
\param width The visible width of the inputline.
\todo the size thing is stupid and broken.
*/
- (void) setWidth: (int)width;
/** Set up the target/action for when the enter key is pressed.
The method will be called with a single string parameter representing the
text of the inputline. eg:
-enter: (string) text;
\param obj The object receiving the message.
\param sel The selector representing the message.
\todo -(void) set[X]Action: (SEL)aSelector;
\todo -(void) setTarget: (id)ahnObject;
*/
- (void) setEnter: obj message:(SEL) msg;
/** Turn the inputline's cursor on or off.
\param cursor 0 turns off the cursor, non-0 turns it on.
*/
- (void) cursor: (BOOL)cursor;
/** Process a keystroke.
\param key The Quake key code for the key press.
*/
- (void) processInput: (int)key;
/** Set the text of the inputline
\param text The text to which the inputline will be set.
*/
- (id) setText: (string)text;
/** Retrieve the text of the inputline.
\return The current text of the intputline.
*/
- (string) text;
@end
//@}
#endif //__ruamoko_gui_InputLine_h

View file

@ -3,6 +3,9 @@
#include "gui/View.h"
/** \addtogroup gui */
//@{
@interface Pic : View
{
string pic_name;
@ -15,4 +18,6 @@
-(void)draw;
@end
//@}
#endif//__ruamoko_gui_Pic_h

View file

@ -1,6 +1,9 @@
#ifndef __ruamoko_gui_Point_h
#define __ruamoko_gui_Point_h
/** \addtogroup gui */
//@{
struct Point {
int x;
int y;
@ -12,4 +15,6 @@ typedef struct Point Point;
@extern Point addPoint (Point a, Point b);
@extern Point subtractPoint (Point a, Point b);
//@}
#endif //__ruamoko_gui_Point_h

View file

@ -4,6 +4,9 @@
#include "gui/Point.h"
#include "gui/Size.h"
/** \addtogroup gui */
//@{
struct Rect {
Point origin;
Size size;
@ -27,4 +30,6 @@ typedef struct Rect Rect;
- (Rect) offsetBySize: (Size)aSize;
#endif
//@}
#endif //__ruamoko_gui_Rect_h

View file

@ -1,6 +1,9 @@
#ifndef __ruamoko_gui_Size_h
#define __ruamoko_gui_Size_h
/** \addtogroup gui */
//@{
struct Size {
int width;
int height;
@ -12,4 +15,6 @@ typedef struct Size Size;
@extern Size addSize (Size a, Size b);
@extern Size subtractSize (Size a, Size b);
//@}
#endif //__ruamoko_gui_Size_h

View file

@ -3,6 +3,9 @@
#include "View.h"
/** \addtogroup gui */
//@{
@interface Slider: View
{
int index;
@ -16,4 +19,6 @@
@end
//@}
#endif //__ruamoko_gui_Slider_h

View file

@ -3,6 +3,9 @@
#include "View.h"
/** \addtogroup gui */
//@{
@interface Text: View
{
@public
@ -15,4 +18,6 @@
- (void) draw;
@end
//@}
#endif //__ruamoko_gui_Text_h

View file

@ -4,6 +4,12 @@
#include "Object.h"
#include "gui/Rect.h"
/** \defgroup gui GUI goo for gooey chewing
*/
/** \addtogroup gui */
//@{
/** The View class.
*/
@interface View: Object
@ -28,4 +34,6 @@
- (int) keyEvent:(int)key unicode:(int)unicode down:(int)down;
@end
//@}
#endif //__ruamoko_gui_View_h

View file

@ -425,7 +425,7 @@ int expr_integer (expr_t *e);
/** Create a new integer constant expression node.
\param integer_val The integer constant being represented.
\param uinteger_val The integer constant being represented.
\return The new integer constant expression node
(expr_t::e::integer_val).
*/

View file

@ -427,6 +427,7 @@ add_code (qfo_mspace_t *code)
/** Add the data in a data space to the working qfo.
\param space The space to which the data will be added.
\param data A data space of the qfo being linked.
*/
static void