22#ifndef TITANIC_PET_GLYPHS_H
23#define TITANIC_PET_GLYPHS_H
25#include "common/keyboard.h"
26#include "titanic/core/list.h"
27#include "titanic/messages/mouse_messages.h"
28#include "titanic/pet_control/pet_gfx_element.h"
29#include "titanic/support/rect.h"
39enum GlyphActionMode { ACTION_REMOVE = 0, ACTION_REMOVED = 1, ACTION_CHANGE = 2 };
41enum GlyphFlag { GFLAG_1 = 1, GFLAG_2 = 2, GFLAG_4 = 4, GFLAG_8 = 8, GFLAG_16 = 16 };
45 GlyphActionMode _mode;
50 GlyphActionMode getMode()
const {
return _mode; }
73 virtual bool reset() {
return false; }
186 virtual bool proc33(
CPetGlyph *glyph) {
return true; }
249 Point getPosition(
int index)
const;
254 Rect getRect(
int index)
const;
259 int getHighlightedIndex(
int index)
const;
264 int getItemIndex(
int index)
const;
269 void setSelectedIndex(
int index);
279 void setFirstVisible(
int index);
289 bool areItemsValid()
const;
291 int _firstVisibleIndex;
293 int _numVisibleGlyphs;
341 void setFlags(
int flags) { _flags = flags; }
435 bool highlighted14();
Definition: messages.h:410
Definition: game_object.h:79
Definition: pet_glyphs.h:43
Definition: mouse_messages.h:117
Definition: mouse_messages.h:181
Definition: mouse_messages.h:139
Definition: mouse_messages.h:150
Definition: pet_control.h:45
void translate(int deltaX, int deltaY)
Definition: pet_element.h:143
Definition: pet_gfx_element.h:29
Definition: pet_glyphs.h:53
virtual void saveGlyph(SimpleFile *file, int indent)
Definition: pet_glyphs.h:184
virtual bool dragGlyph(const Point &topLeft, CMouseDragStartMsg *msg)
Definition: pet_glyphs.h:168
void translateBack(const Point &pt)
Definition: pet_glyphs.h:221
virtual bool MouseButtonUpMsg(const Point &pt)
Definition: pet_glyphs.h:128
virtual void glyphFocused(const Point &topLeft, bool flag)
Definition: pet_glyphs.h:158
void setName(const CString &name, CPetControl *petControl)
virtual void leaveHighlighted()
Definition: pet_glyphs.h:201
virtual void unhighlightCurrent()
Definition: pet_glyphs.h:148
virtual void enter()
Definition: pet_glyphs.h:78
virtual void getTooltip(CTextControl *text)
Definition: pet_glyphs.h:179
virtual bool MouseDragMoveMsg(CMouseDragMoveMsg *msg)
Definition: pet_glyphs.h:118
virtual bool isValid() const
Definition: pet_glyphs.h:191
void translate(const Point &pt)
Definition: pet_glyphs.h:216
virtual void draw2(CScreenManager *screenManager)
Definition: pet_glyphs.h:93
virtual bool MouseButtonDownMsg(const Point &pt)
Definition: pet_glyphs.h:108
virtual bool MouseDragStartMsg(CMouseDragStartMsg *msg)
Definition: pet_glyphs.h:113
virtual bool MouseDragEndMsg(CMouseDragEndMsg *msg)
Definition: pet_glyphs.h:123
virtual bool setup(CPetControl *petControl, CPetGlyphs *owner)
virtual void drawAt(CScreenManager *screenManager, const Point &pt, bool isHighlighted)
virtual bool reset()
Definition: pet_glyphs.h:73
bool isHighlighted() const
virtual Rect getBounds() const
Definition: pet_glyphs.h:103
CPetControl * getPetControl() const
virtual void selectGlyph(const Point &topLeft, const Point &pt)
Definition: pet_glyphs.h:163
virtual CGameObject * getObjectAt()
Definition: pet_glyphs.h:206
virtual bool enterHighlighted()
Definition: pet_glyphs.h:196
CPetGlyphs * getOwner()
Definition: pet_glyphs.h:226
virtual bool ActionMsg(CActionMsg *msg)
Definition: pet_glyphs.h:143
virtual bool KeyCharMsg(int key)
Definition: pet_glyphs.h:138
virtual void leave()
Definition: pet_glyphs.h:83
CPetSection * getPetSection() const
virtual bool MouseDoubleClickMsg(const CMouseDoubleClickMsg *msg)
Definition: pet_glyphs.h:133
virtual void updateTooltip()
virtual void highlightCurrent(const Point &pt)
Definition: pet_glyphs.h:153
virtual bool contains(const Point &delta, const Point &pt)
virtual bool doAction(CGlyphAction *action)
Definition: pet_glyphs.h:211
Definition: pet_glyphs.h:244
bool MouseDragEndMsg(CMouseDragEndMsg *msg)
bool MouseButtonDownMsg(const Point &pt)
bool isGlyphHighlighted(const CPetGlyph *glyph) const
void highlight(const CPetGlyph *glyph)
bool MouseButtonUpMsg(const Point &pt)
void changeHighlight(int index)
virtual void setup(int numVisible, CPetSection *owner)
bool MouseDragStartMsg(CMouseDragStartMsg *msg)
Point getHighlightedGlyphPos() const
void draw(CScreenManager *screenManager)
void resetHighlight()
Definition: pet_glyphs.h:433
CPetControl * getPetControl() const
void scrollToStart()
Definition: pet_glyphs.h:445
bool ActionMsg(CActionMsg *msg)
bool MouseDragMoveMsg(CMouseDragMoveMsg *msg)
void startDragging(CPetGlyph *glyph, CMouseDragStartMsg *msg)
void highlight(int index)
bool MouseDoubleClickMsg(const Point &pt)
Definition: pet_glyphs.h:381
CPetSection * getOwner() const
Definition: pet_glyphs.h:361
int indexOf(const CPetGlyph *glyph) const
int getHighlightIndex() const
Definition: pet_glyphs.h:480
void setNumVisible(int total)
CGameObject * getObjectAt(const Point &pt) const
Definition: pet_section.h:51
Definition: screen_manager.h:49
Definition: text_control.h:35
Definition: simple_file.h:49