|
Atrinik Client 2.5
|
00001 /************************************************************************ 00002 * Atrinik, a Multiplayer Online Role Playing Game * 00003 * * 00004 * Copyright (C) 2009-2011 Alex Tokar and Atrinik Development Team * 00005 * * 00006 * Fork from Daimonin (Massive Multiplayer Online Role Playing Game) * 00007 * and Crossfire (Multiplayer game for X-windows). * 00008 * * 00009 * This program is free software; you can redistribute it and/or modify * 00010 * it under the terms of the GNU General Public License as published by * 00011 * the Free Software Foundation; either version 2 of the License, or * 00012 * (at your option) any later version. * 00013 * * 00014 * This program is distributed in the hope that it will be useful, * 00015 * but WITHOUT ANY WARRANTY; without even the implied warranty of * 00016 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * 00017 * GNU General Public License for more details. * 00018 * * 00019 * You should have received a copy of the GNU General Public License * 00020 * along with this program; if not, write to the Free Software * 00021 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. * 00022 * * 00023 * The author can be reached at admin@atrinik.org * 00024 ************************************************************************/ 00025 00030 #ifndef TEXTWIN_H 00031 #define TEXTWIN_H 00032 00033 /* Highlights */ 00034 enum 00035 { 00036 TW_HL_NONE, 00037 TW_HL_UP, 00038 TW_ABOVE, 00039 TW_HL_SLIDER, 00040 TW_UNDER, 00041 TW_HL_DOWN 00042 }; 00043 00044 /* Flags */ 00045 enum 00046 { 00047 TW_SCROLL = 1 00048 }; 00049 00051 typedef struct textwin_struct 00052 { 00054 int x, y; 00055 00057 int scroll; 00058 00060 int slider_h; 00061 00063 int slider_y; 00064 00066 int highlight; 00067 00069 char *entries; 00070 00072 size_t num_entries; 00073 00075 size_t entries_size; 00076 00078 int font; 00079 00081 int flags; 00082 00084 uint8 selection_started; 00085 00087 sint64 selection_start; 00088 00090 sint64 selection_end; 00091 00093 int old_slider_pos; 00094 } textwin_struct; 00095 00097 #define TEXTWIN_ROWS_VISIBLE(widget) ((widget)->ht / FONT_HEIGHT(TEXTWIN((widget))->font)) 00098 00099 #define TEXTWIN_TEXT_FLAGS(widget) ((widget)->WidgetTypeID == MSGWIN_ID ? TEXT_WORD_WRAP | TEXT_MARKUP | TEXT_NO_FONT_CHANGE : TEXT_WORD_WRAP) 00100 00101 #endif
1.7.4