git-svn-id: svn://kolibrios.org@5979 a494cfbc-eb01-0410-851d-a64ba20cac60
This commit is contained in:
Kirill Lipatov (Leency) 2015-12-16 22:48:58 +00:00
parent c455cae71e
commit e6ee9c8f61
2 changed files with 11 additions and 8 deletions

View File

@ -3,13 +3,13 @@
struct _History { struct _History {
collection items; collection items;
int active; int active;
dword add(); int add();
dword back(); int back();
dword forward(); int forward();
dword current(); dword current();
} History; } History;
dword _History::add(dword in) int _History::add(dword in)
{ {
if (!strcmp(in, items.get(active-1))) return 0; if (!strcmp(in, items.get(active-1))) return 0;
items.count = active; items.count = active;
@ -18,18 +18,18 @@ dword _History::add(dword in)
return 1; return 1;
} }
dword _History::back() int _History::back()
{ {
if (active==1) return 0; if (active==1) return 0;
active--; active--;
return items.get(active-1); return 1;
} }
dword _History::forward() int _History::forward()
{ {
if (active==items.count) return 0; if (active==items.count) return 0;
active++; active++;
return items.get(active-1); return 1;
} }
dword _History::current() dword _History::current()

View File

@ -12,6 +12,7 @@
#include "../lib/socket.h" #include "../lib/socket.h"
#include "../lib/draw_buf.h" #include "../lib/draw_buf.h"
#include "../lib/cursor.h" #include "../lib/cursor.h"
#include "../lib/collection.h"
//*.obj libraries //*.obj libraries
#include "../lib/obj/box_lib.h" #include "../lib/obj/box_lib.h"
#include "../lib/obj/network.h" #include "../lib/obj/network.h"
@ -19,6 +20,8 @@
#include "../lib/obj/libimg_lib.h" #include "../lib/obj/libimg_lib.h"
#include "../lib/obj/netcode.h" #include "../lib/obj/netcode.h"
#include "../lib/obj/iconv.h" #include "../lib/obj/iconv.h"
//patternts
#include "..\lib\patterns\history.h"
//images //images
byte letter_icons[sizeof(file "img/letter_icons.raw")] = FROM "img/letter_icons.raw"; byte letter_icons[sizeof(file "img/letter_icons.raw")] = FROM "img/letter_icons.raw";
#include "img/letter_icons.h" #include "img/letter_icons.h"