Files
oboe/osx/dialogxml/scrollbar.h
Celtic Minstrel 94d8717a0b Nuke as many warnings as possible, and several globals as well
- Warnings completely suppressed for the included TinyXML and gzstream libraries
- Parentheses warnings are now errors, since there were several that looked like bugs
- Ditto for dangling else warnings

Some of these warnings were actually bugs:
- Town wandering monsters would have never spawned, because the code to do so was accidentally nested within a check for overall_mode == MODE_OUTDOORS
---> boe.monster.cpp, lines 105-137
- Monster's behaviour with respect to elemental fields did not correctly depend on their immunities (this is the same precedence issue Sylae messed up fixing in the Windows code)
---> boe.monsters.cpp, lines 345-359
- Display of damage blocked by armour appeared to be incorrect (needs verification)
---> boe.newgraph.cpp, line 1079
- Three-choice dialogs probably weren't dealing with unusual button types correctly, though that's a minor point since they aren't expected to use such buttons
2014-12-04 12:44:17 -05:00

50 lines
1.2 KiB
C++

//
// scrollbar.h
// BoE
//
// Created by Celtic Minstrel on 14-03-26.
//
//
#ifndef BoE_scrollbar_h
#define BoE_scrollbar_h
#include "control.h"
class cScrollbar : public cControl {
int pos, max, pgsz;
enum {
PART_UP,
PART_PGUP,
PART_THUMB,
PART_PGDN,
PART_DOWN,
} pressedPart;
click_callback_t onClick;
static sf::Texture scroll_gw;
public:
static void init();
explicit cScrollbar(sf::RenderWindow& parent);
explicit cScrollbar(cDialog& parent);
void attachClickHandler(click_callback_t f) throw(xHandlerNotSupported);
void attachFocusHandler(focus_callback_t f) throw(xHandlerNotSupported);
bool triggerClickHandler(cDialog& me, std::string id, eKeyMod mods);
bool handleClick(location where);
void setFormat(eFormat prop, short val) throw(xUnsupportedProp);
short getFormat(eFormat prop) throw(xUnsupportedProp);
void setColour(sf::Color clr) throw(xUnsupportedProp);
sf::Color getColour() throw(xUnsupportedProp);
bool isClickable();
long getPosition();
long getMaximum();
long getPageSize();
void setPosition(long to);
void setMaximum(long to);
void setPageSize(long to);
void draw();
cScrollbar& operator=(cScrollbar& other) = delete;
cScrollbar(cScrollbar& other) = delete;
};
#endif