Public Member Functions | Private Member Functions | Private Attributes
MailViewWindow Class Reference

#include <mailviewwindow.h>

Inheritance diagram for MailViewWindow:
Window ActionListener BasicContainer2 MouseListener WidgetListener BasicContainer Widget WidgetDeathListener Widget2

Public Member Functions

 MailViewWindow (MailMessage *const message, const int itemsCount)
 ~MailViewWindow ()
void action (const ActionEvent &event)
InventorygetInventory () const
void updateItems ()
void removeItems (const int64_t mailId)
void removeMoney (const int64_t mailId)
- Public Member Functions inherited from Window
 Window (const std::string &caption, const Modal modal, Window *const parent, std::string skin)
 ~Window ()
void draw (Graphics *const graphics)
void safeDraw (Graphics *const graphics)
void setContentSize (int width, int height)
void setLocationRelativeTo (const Widget *const widget)
void setLocationHorisontallyRelativeTo (const Widget *const widget)
void setLocationRelativeTo (const ImagePosition::Type &position, int offsetX, int offsetY)
void setResizable (const bool resize)
void redraw ()
void widgetResized (const Event &event)
void widgetMoved (const Event &event)
void widgetHidden (const Event &event)
void setCloseButton (const bool flag)
bool getCloseButton () const
void setAllowClose (const bool b)
bool getAlowClose () const
bool isResizable () const
void setMinWidth (const int width)
int getMinWidth () const
void setMinHeight (const int height)
int getMinHeight () const
void setMaxWidth (const int width)
int getMaxWidth () const
void setMaxHeight (const int height)
int getMaxHeight () const
void setShowTitle (bool flag)
void setStickyButton (const bool flag)
void setSticky (const bool sticky)
bool isSticky () const
void setStickyButtonLock (const bool sticky)
bool isStickyButtonLock () const
virtual void setVisible (Visible visible)
void setVisible (const Visible visible, const bool forceSticky)
bool isDefaultVisible () const
void setDefaultVisible (const bool save)
bool willSaveVisible () const
void setSaveVisible (const bool save)
void postInit ()
WindowgetParentWindow () const
virtual void scheduleDelete ()
void mousePressed (MouseEvent &event)
void mouseDragged (MouseEvent &event)
void mouseMoved (MouseEvent &event)
void mouseReleased (MouseEvent &event)
void mouseExited (MouseEvent &event)
void mouseEntered (MouseEvent &event)
void updateResizeHandler (MouseEvent &event)
void setWindowName (const std::string &name)
const std::string & getWindowName () const
void loadWindowState ()
void saveWindowState ()
void setDefaultSize (const int defaultX, const int defaultY, int defaultWidth, int defaultHeight)
void setDefaultSize ()
void setDefaultSize (const int defaultWidth, const int defaultHeight, const ImagePosition::Type &position, const int offsetx, const int offsetY)
virtual void resetToDefaultSize ()
void adjustPositionAfterResize (const int oldScreenWidth, const int oldScreenHeight)
LayoutgetLayout ()
void clearLayout ()
void reflowLayout (int w, int h)
LayoutCellplace (const int x, const int y, Widget *const wg, const int w, const int h)
ContainerPlacer getPlacer (const int x, const int y)
void center ()
void centerHorisontally ()
virtual void close ()
void setModal (const Modal modal)
Rect getWindowArea () const
bool isResizeAllowed (const MouseEvent &event) const
void setCaptionFont (Font *font)
void enableVisibleSound (bool b)
bool isWindowVisible () const
void setPadding (int padding)
int getPadding () const
void setTitleBarHeight (unsigned int height)
unsigned int getTitleBarHeight () const
void setCaption (const std::string &caption)
const std::string & getCaption () const
void setAlignment (Graphics::Alignment alignment)
Graphics::Alignment getAlignment () const
void setMovable (Move movable)
bool isMovable () const
Rect getChildrenArea ()
virtual void resizeToContent ()
- Public Member Functions inherited from BasicContainer2
 BasicContainer2 (const Widget2 *const widget)
 ~BasicContainer2 ()
void setOpaque (Opaque opaque)
bool isOpaque () const
virtual void add (Widget *const widget)
void addXY (Widget *const widget, const int x, const int y)
- Public Member Functions inherited from BasicContainer
 BasicContainer (const Widget2 *const widget)
 ~BasicContainer ()
void showWidgetPart (Widget *const widget, const Rect &area)
void moveToTop (Widget *const widget)
void moveToBottom (Widget *const widget)
void focusNext ()
void focusPrevious ()
void logic ()
void setFocusHandler (FocusHandler *const focusHandler)
void setInternalFocusHandler (FocusHandler *const focusHandler)
WidgetgetWidgetAt (int x, int y)
void death (const Event &event)
WidgetfindFirstWidget (const std::set< Widget * > &list)
void add (Widget *const widget)
virtual void remove (Widget *const widget)
virtual void clear ()
- Public Member Functions inherited from Widget
 Widget (const Widget2 *const widget)
 ~Widget ()
virtual void drawFrame (Graphics *graphics)
virtual void safeDrawFrame (Graphics *graphics)
void setFrameSize (const unsigned int frameSize)
unsigned int getFrameSize () const
WidgetgetParent () const
void setWidth (const int width)
int getWidth () const
void setHeight (const int height)
int getHeight () const
void setSize (const int width, const int height)
void setX (const int x)
int getX () const
void setY (const int y)
int getY () const
void setPosition (const int x, const int y)
void setDimension (const Rect &dimension)
const RectgetDimension () const
void setFocusable (const bool focusable)
bool isFocusable () const
virtual bool isFocused () const
void setEnabled (const bool enabled)
bool isEnabled () const
void setVisible (Visible visible)
bool isVisible () const
void setBaseColor (const Color &color)
const ColorgetBaseColor () const
void setForegroundColor (const Color &color)
const ColorgetForegroundColor () const
void setBackgroundColor (const Color &color)
const ColorgetBackgroundColor () const
virtual void requestFocus ()
virtual void requestMoveToTop ()
virtual void requestMoveToBottom ()
FocusHandlergetFocusHandler ()
void addActionListener (ActionListener *const actionListener)
void removeActionListener (ActionListener *const actionListener)
void addDeathListener (WidgetDeathListener *const deathListener)
void removeDeathListener (WidgetDeathListener *const deathListener)
void addMouseListener (MouseListener *const mouseListener)
void removeMouseListener (MouseListener *const mouseListener)
void addKeyListener (KeyListener *const keyListener)
void removeKeyListener (KeyListener *const keyListener)
void addFocusListener (FocusListener *const focusListener)
void removeFocusListener (FocusListener *const focusListener)
void addWidgetListener (WidgetListener *const widgetListener)
void removeWidgetListener (WidgetListener *const widgetListener)
void setActionEventId (const std::string &actionEventId)
const std::string & getActionEventId () const
virtual void getAbsolutePosition (int &x, int &y) const
virtual void setParent (Widget *parent)
FontgetFont () const
void setFont (Font *const font)
virtual void fontChanged ()
bool isTabInEnabled () const
void setTabInEnabled (const bool enabled)
bool isTabOutEnabled () const
void setTabOutEnabled (const bool enabled)
void requestModalFocus ()
virtual void requestModalMouseInputFocus ()
virtual void releaseModalFocus ()
virtual void releaseModalMouseInputFocus ()
virtual bool isModalFocused () const
virtual bool isModalMouseInputFocused () const
const std::list< MouseListener * > & getMouseListeners () const A_CONST
const std::list< KeyListener * > & getKeyListeners () const A_CONST
const std::list< FocusListener * > & getFocusListeners () const A_CONST
virtual FocusHandlergetInternalFocusHandler ()
void setInternalFocusHandler (FocusHandler *const internalFocusHandler)
void setId (const std::string &id)
const std::string & getId () const
virtual void showPart (const Rect &rectangle)
bool isAllowLogic () const
void setMouseConsume (const bool b)
bool isMouseConsume () const
void setRedraw (const bool b)
virtual bool isSelectable () const
void setSelectable (const bool selectable)
void windowResized ()
- Public Member Functions inherited from Widget2
virtual ~Widget2 ()
const ColorgetThemeColor (const ThemeColorIdT type, const unsigned int alpha) const A_INLINE
const ColorgetThemeCharColor (const signed char c, bool &valid) const A_INLINE
virtual void setWidget2 (const Widget2 *const widget)
void setPalette (int palette)
void checkPalette ()
void setForegroundColor2 (const Color &color)
WidgetgetWindow () const
virtual void setWindow (Widget *const window)
- Public Member Functions inherited from WidgetDeathListener
virtual ~WidgetDeathListener ()
- Public Member Functions inherited from MouseListener
virtual ~MouseListener ()
virtual void mouseClicked (MouseEvent &event)
virtual void mouseWheelMovedUp (MouseEvent &event)
virtual void mouseWheelMovedDown (MouseEvent &event)
- Public Member Functions inherited from WidgetListener
virtual ~WidgetListener ()
virtual void widgetShown (const Event &event)
- Public Member Functions inherited from ActionListener
virtual ~ActionListener ()

Private Member Functions

void updateAttachButton ()

Private Attributes

bool mUseMail2

Additional Inherited Members

- Static Public Member Functions inherited from Window
static void setWindowContainer (WindowContainer *const windowContainer)
- Static Public Member Functions inherited from Widget
static void setGlobalFont (Font *const font)
static FontgetGloablFont ()
static void cleanGlobalFont ()
static bool widgetExists (const Widget *const widget)
static void distributeWindowResizeEvent ()
static WidgetcallPostInit (Widget *const widget)
- Data Fields inherited from Widget
Visible mVisible
- Protected Types inherited from BasicContainer
typedef std::vector< Widget * > WidgetList
typedef WidgetList::iterator WidgetListIterator
typedef WidgetList::const_iterator WidgetListConstIterator
typedef WidgetList::reverse_iterator WidgetListReverseIterator
typedef WidgetList::const_reverse_iterator WidgetListCReverseIterator
- Protected Types inherited from Widget
typedef std::list< MouseListener * > MouseListenerList
typedef MouseListenerList::iterator MouseListenerIterator
typedef std::list< KeyListener * > KeyListenerList
typedef KeyListenerList::iterator KeyListenerIterator
typedef std::list< ActionListener * > ActionListenerList
typedef ActionListenerList::iterator ActionListenerIterator
typedef std::list< WidgetDeathListener * > WidgetDeathListenerList
typedef WidgetDeathListenerList::iterator WidgetDeathListenerIterator
typedef std::list< FocusListener * > FocusListenerList
typedef FocusListenerList::iterator FocusListenerIterator
typedef std::list< WidgetListener * > WidgetListenerList
typedef WidgetListenerList::iterator WidgetListenerIterator
- Protected Member Functions inherited from Window
bool canMove () const
int getOption (const std::string &name, const int def) const
bool getOptionBool (const std::string &name, const bool def) const
void setTitlePadding (const int p)
int getTitlePadding () const
- Protected Member Functions inherited from BasicContainer
virtual void drawChildren (Graphics *const graphics)
virtual void safeDrawChildren (Graphics *const graphics)
virtual void logicChildren ()
- Protected Member Functions inherited from Widget
void distributeActionEvent ()
void distributeResizedEvent ()
void distributeMovedEvent ()
void distributeHiddenEvent ()
void distributeShownEvent ()
- Protected Member Functions inherited from Widget2
 Widget2 (const Widget2 *const widget)
- Protected Member Functions inherited from WidgetDeathListener
 WidgetDeathListener ()
- Protected Member Functions inherited from MouseListener
 MouseListener ()
- Protected Member Functions inherited from WidgetListener
 WidgetListener ()
- Protected Member Functions inherited from ActionListener
 ActionListener ()
- Protected Attributes inherited from Window
std::string mCaption
Graphics::Alignment mAlignment
int mPadding
unsigned int mTitleBarHeight
Move mMovable
int mDragOffsetX
int mDragOffsetY
bool mMoved
int mDefaultX
int mDefaultY
int mDefaultWidth
int mDefaultHeight
int mCaptionOffsetX
int mCaptionOffsetY
bool mShowTitle
bool mLastRedraw
- Protected Attributes inherited from BasicContainer2
Opaque mOpaque
- Protected Attributes inherited from BasicContainer
WidgetList mWidgets
WidgetList mLogicWidgets
- Protected Attributes inherited from Widget
MouseListenerList mMouseListeners
KeyListenerList mKeyListeners
ActionListenerList mActionListeners
WidgetDeathListenerList mDeathListeners
FocusListenerList mFocusListeners
WidgetListenerList mWidgetListeners
Color mForegroundColor
Color mBackgroundColor
Color mBaseColor
Rect mDimension
std::string mActionEventId
std::string mId
unsigned int mFrameSize
bool mFocusable
bool mTabIn
bool mTabOut
bool mEnabled
bool mAllowLogic
bool mMouseConsume
bool mRedraw
bool mSelectable
- Protected Attributes inherited from Widget2
int mPaletteOffset
Color mForegroundColor2
- Static Protected Attributes inherited from Widget
static FontmGlobalFont = 0

Detailed Description

Definition at line 37 of file mailviewwindow.h.

Constructor & Destructor Documentation

◆ MailViewWindow()

MailViewWindow::MailViewWindow ( MailMessage *const  message,
const int  itemsCount 

Definition at line 50 of file mailviewwindow.cpp.

51  :
52  // TRANSLATORS: mail view window name
53  Window(_("View mail"), Modal_false, nullptr, "mailview.xml"),
55  mMessage(message),
56  mGetAttachButton(new Button(this,
57  // TRANSLATORS: mail view attach / items button
58  settings.enableNewMailSystem ? _("Get items") : _("Get attach"),
59  "attach",
61  this)),
62  mGetMoneyButton(nullptr),
63  // TRANSLATORS: mail view window button
64  mCloseButton(new Button(this, _("Close"), "close", BUTTON_SKIN, this)),
65  mPrevButton(new Button(this, "<", "prev", BUTTON_SKIN, this)),
66  mNextButton(new Button(this, ">", "next", BUTTON_SKIN, this)),
67  // TRANSLATORS: mail view window button
68  mReplyButton(new Button(this, _("Reply"), "reply", BUTTON_SKIN, this)),
69  // TRANSLATORS: mail view window label
70  mTimeLabel(new Label(this, strprintf("%s %s", _("Time:"),
71  message->strTime.c_str()))),
72  mMoneyLabel(nullptr),
73  // TRANSLATORS: mail view window label
74  mFromLabel(new Label(this, strprintf("%s %s", _("From:"),
75  message->sender.c_str()))),
76  // TRANSLATORS: mail view window label
77  mSubjectLabel(new Label(this, strprintf("%s %s", _("Subject:"),
78  message->title.c_str()))),
79  // TRANSLATORS: mail view window label
80  mMessageLabel(new Label(this, strprintf("%s %s", _("Message:"),
81  message->text.c_str()))),
83  mItemContainer(new ItemContainer(this, mInventory, 100000,
86  fromBool(getOptionBool("showitemsbackground", false), Opaque),
87  "mailview_listbackground.xml")),
89 {
90  setWindowName("MailView");
91  setCloseButton(true);
92  setResizable(true);
93  setSaveVisible(false);
94  setStickyButtonLock(true);
97  setDefaultSize(380, 370, ImagePosition::CENTER, 0, 0);
98  setMinWidth(200);
99  setMinHeight(100);
100  center();
105  ContainerPlacer placer(nullptr, nullptr);
106  placer = getPlacer(0, 0);
108  int n = 0;
109  placer(0, n++, mTimeLabel, 1, 1);
110  placer(0, n++, mFromLabel, 1, 1);
111  placer(0, n++, mSubjectLabel, 1, 1);
112  if (message->money != 0)
113  {
114  mMoneyLabel = new Label(this, strprintf("%s %u",
115  // TRANSLATORS: mail view window label
116  _("Money:"),
117  CAST_U32(message->money)));
118  placer(0, n++, mMoneyLabel, 1, 1);
119  }
120  placer(0, n++, mMessageLabel, 1, 1);
121  placer(0, n++, mItemScrollArea, 1, 1);
123  if (mUseMail2 && message->money != 0)
124  {
125  mGetMoneyButton = new Button(this,
126  // TRANSLATORS: mail view attached money button
127  _("Get money"),
128  "money",
130  this);
131  placer(0, n++, mGetMoneyButton, 1, 1);
132  }
133  placer(0, n++, mGetAttachButton, 1, 1);
136  ContainerPlacer placer2(nullptr, nullptr);
137  placer2 = getPlacer(0, n);
139  placer2(0, 0, mPrevButton, 1, 1);
140  placer2(1, 0, mNextButton, 1, 1);
141  placer2(3, 0, mReplyButton, 1, 1);
142  placer2(4, 0, mCloseButton, 1, 1);
144  loadWindowState();
145  enableVisibleSound(true);
146 }
#define fromBool(val, name)
Definition: booldefines.h:49
const std::string BUTTON_SKIN
Definition: button.h:89
#define CAST_U32
Definition: cast.h:31
Definition: button.h:102
Definition: label.h:91
ItemContainer * mItemContainer
Label * mMessageLabel
Button * mGetMoneyButton
Label * mMoneyLabel
MailMessage * mMessage
Button * mCloseButton
Button * mGetAttachButton
Label * mFromLabel
Inventory * mInventory
ScrollArea * mItemScrollArea
Button * mNextButton
Button * mPrevButton
Label * mSubjectLabel
Label * mTimeLabel
Button * mReplyButton
void setHorizontalScrollPolicy(const ScrollPolicy hPolicy)
void setHeight(int height)
bool enableNewMailSystem
Definition: settings.h:165
void center()
Definition: window.cpp:1417
void setSaveVisible(const bool save)
Definition: window.h:300
void setResizable(const bool resize)
Definition: window.cpp:627
ContainerPlacer getPlacer(const int x, const int y)
Definition: window.cpp:1391
virtual void setVisible(Visible visible)
Definition: window.cpp:778
bool getOptionBool(const std::string &name, const bool def) const
Definition: window.cpp:1466
void setWindowName(const std::string &name)
Definition: window.h:355
Window(const std::string &caption, const Modal modal, Window *const parent, std::string skin)
Definition: window.cpp:109
void setMinHeight(const int height)
Definition: window.cpp:604
void setMinWidth(const int width)
Definition: window.cpp:591
void enableVisibleSound(bool b)
Definition: window.h:481
void setCloseButton(const bool flag)
Definition: window.cpp:749
void setStickyButtonLock(const bool sticky)
Definition: window.cpp:772
void setDefaultSize()
Definition: window.cpp:1198
void loadWindowState()
Definition: window.cpp:1087
const bool ForceQuantity_false
Definition: forcequantity.h:30
#define _(s)
Definition: gettext.h:35
const bool Modal_false
Definition: modal.h:30
bool Opaque
Definition: opaque.h:30
Settings settings
Definition: settings.cpp:32
const bool ShowEmptyRows_false
Definition: showemptyrows.h:30
std::string strprintf(const char *const format,...)
int64_t money
Definition: mailmessage.h:57
std::string sender
Definition: mailmessage.h:51
std::string strTime
Definition: mailmessage.h:52
std::string title
Definition: mailmessage.h:50
std::string text
Definition: mailmessage.h:53
const bool Visible_true
Definition: visible.h:30

References _, BUTTON_SKIN, CAST_U32, ImagePosition::CENTER, Window::center(), Window::enableVisibleSound(), Window::getPlacer(), Window::loadWindowState(), mCloseButton, mFromLabel, mGetAttachButton, mGetMoneyButton, mItemScrollArea, mMessageLabel, mMoneyLabel, mNextButton, MailMessage::money, mPrevButton, mReplyButton, mSubjectLabel, mTimeLabel, mUseMail2, Window::setCloseButton(), Window::setDefaultSize(), ScrollArea::setHeight(), ScrollArea::setHorizontalScrollPolicy(), Window::setMinHeight(), Window::setMinWidth(), Window::setResizable(), Window::setSaveVisible(), Window::setStickyButtonLock(), Window::setVisible(), Window::setWindowName(), ScrollArea::SHOW_NEVER, strprintf(), updateAttachButton(), and Visible_true.

◆ ~MailViewWindow()

MailViewWindow::~MailViewWindow ( )

Definition at line 148 of file mailviewwindow.cpp.

149 {
150  if (mUseMail2)
151  {
152  mMessage = nullptr;
153  }
154  else
155  {
158  }
160  mailViewWindow = nullptr;
161 }
#define delete2(var)
Definition: delete2.h:25
MailViewWindow * mailViewWindow

References delete2, mailViewWindow, mGetMoneyButton, mInventory, mMessage, and mUseMail2.

Member Function Documentation

◆ action()

void MailViewWindow::action ( const ActionEvent actionEvent)

Called when an action is recieved from a widget. It is used to be able to recieve a notification that an action has occured.

actionEventThe event of the action.

Implements ActionListener.

Definition at line 163 of file mailviewwindow.cpp.

164 {
165  const std::string &eventId = event.getId();
166  if (eventId == "close")
167  {
168  scheduleDelete();
169  }
170  else if (eventId == "attach")
171  {
172  if (mUseMail2)
173  {
175  mMessage->id);
176  }
177  else
178  {
180  }
181  }
182  else if (eventId == "money")
183  {
184  if (mUseMail2)
185  {
187  mMessage->id);
188  }
189  }
190  else if (eventId == "next")
191  {
192  if (mMessage != nullptr)
194  }
195  else if (eventId == "prev")
196  {
197  if (mMessage != nullptr)
199  }
200  else if (eventId == "reply")
201  {
202  if (mMessage == nullptr)
203  return;
204  if (mailEditWindow != nullptr)
211  mMessage->sender,
212  std::string(),
213  std::string(),
214  0);
215  scheduleDelete();
216  }
217 }
#define CAST_S32
Definition: cast.h:30
void setMessage(const std::string &str)
void setSubject(const std::string &str)
void setTo(const std::string &str)
void viewPrev(const int64_t id)
Definition: mailwindow.cpp:306
void viewNext(const int64_t id)
Definition: mailwindow.cpp:278
MailOpenTypeT getOpenType() const
Definition: mailwindow.h:79
virtual void requestItems(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void requestMoney(const MailOpenTypeT openType, const int64_t mailId) const =0
virtual void queueCheckName(const MailQueueTypeT type, const std::string &to, const std::string &title, const std::string &body, const int64_t &money) const =0
virtual void getAttach(const int msgId) const =0
virtual void scheduleDelete()
Definition: window.cpp:831
#define CREATEWIDGETV0(var, type)
Definition: createwidget.h:32
Net::Mail2Handler * mail2Handler
Definition: net.cpp:113
MailEditWindow * mailEditWindow
Net::MailHandler * mailHandler
Definition: net.cpp:114
MailWindow * mailWindow
Definition: mailwindow.cpp:54
int64_t id
Definition: mailmessage.h:54

References CAST_S32, CREATEWIDGETV0, Net::MailHandler::getAttach(), MailWindow::getOpenType(), MailMessage::id, mail2Handler, mailEditWindow, mailHandler, mailWindow, mMessage, mUseMail2, Net::Mail2Handler::queueCheckName(), Net::Mail2Handler::requestItems(), Net::Mail2Handler::requestMoney(), Window::scheduleDelete(), MailMessage::sender, MailEditWindow::setMessage(), MailEditWindow::setSubject(), MailEditWindow::setTo(), MailMessage::text, MailMessage::title, MailQueueType::ValidateTo, MailWindow::viewNext(), and MailWindow::viewPrev().

◆ getInventory()

Inventory * MailViewWindow::getInventory ( ) const

Definition at line 219 of file mailviewwindow.cpp.

220 {
221  return mInventory;
222 }

References mInventory.

Referenced by EAthena::Mail2Recv::processReadMail(), and EAthena::MailRecv::processReadMail().

◆ removeItems()

void MailViewWindow::removeItems ( const int64_t  mailId)

◆ removeMoney()

void MailViewWindow::removeMoney ( const int64_t  mailId)

Definition at line 257 of file mailviewwindow.cpp.

258 {
259  if (mailId != mMessage->id)
260  return;
261  mMessage->type = static_cast<MailMessageType::Type>(
263  mMessage->type = static_cast<MailMessageType::Type>(
266  mMessage->money = 0;
268  if (mMoneyLabel == nullptr)
269  return;
271  if (mGetMoneyButton != nullptr)
275  // TRANSLATORS: mail view window label
276  _("Money:"),
277  0));
278  if (mailWindow != nullptr)
280 }
void setCaption(const std::string &caption)
Definition: label.cpp:264
void setVisible(Visible visible)
Definition: widget.cpp:225
const bool Visible_false
Definition: visible.h:30

References _, CAST_S32, MailMessage::id, mailWindow, mGetMoneyButton, mMessage, mMoneyLabel, MailMessageType::Money, MailMessage::money, MailWindow::refreshMailNames(), Label::setCaption(), Widget::setVisible(), strprintf(), MailMessage::type, and Visible_false.

Referenced by EAthena::Mail2Recv::processRequestMoney().

◆ updateAttachButton()

void MailViewWindow::updateAttachButton ( )

Definition at line 224 of file mailviewwindow.cpp.

225 {
226  if ((mMessage->money != 0 && !mUseMail2) ||
227  mInventory->getLastUsedSlot() != -1)
228  {
230  }
231  else
232  {
234  }
235 }
int getLastUsedSlot() const
Definition: inventory.cpp:291

References Inventory::getLastUsedSlot(), mGetAttachButton, mInventory, mMessage, MailMessage::money, mUseMail2, Widget::setVisible(), Visible_false, and Visible_true.

Referenced by MailViewWindow(), removeItems(), and updateItems().

◆ updateItems()

void MailViewWindow::updateItems ( )

Field Documentation

◆ mCloseButton

Button* MailViewWindow::mCloseButton

Definition at line 64 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mFromLabel

Label* MailViewWindow::mFromLabel

Definition at line 70 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mGetAttachButton

Button* MailViewWindow::mGetAttachButton

Definition at line 62 of file mailviewwindow.h.

Referenced by MailViewWindow(), and updateAttachButton().

◆ mGetMoneyButton

Button* MailViewWindow::mGetMoneyButton

Definition at line 63 of file mailviewwindow.h.

Referenced by MailViewWindow(), removeMoney(), and ~MailViewWindow().

◆ mInventory

Inventory* MailViewWindow::mInventory

Definition at line 73 of file mailviewwindow.h.

Referenced by getInventory(), removeItems(), updateAttachButton(), and ~MailViewWindow().

◆ mItemContainer

ItemContainer* MailViewWindow::mItemContainer

Definition at line 74 of file mailviewwindow.h.

Referenced by updateItems().

◆ mItemScrollArea

ScrollArea* MailViewWindow::mItemScrollArea

Definition at line 75 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mMessage

MailMessage* MailViewWindow::mMessage

◆ mMessageLabel

Label* MailViewWindow::mMessageLabel

Definition at line 72 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mMoneyLabel

Label* MailViewWindow::mMoneyLabel

Definition at line 69 of file mailviewwindow.h.

Referenced by MailViewWindow(), and removeMoney().

◆ mNextButton

Button* MailViewWindow::mNextButton

Definition at line 66 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mPrevButton

Button* MailViewWindow::mPrevButton

Definition at line 65 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mReplyButton

Button* MailViewWindow::mReplyButton

Definition at line 67 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mSubjectLabel

Label* MailViewWindow::mSubjectLabel

Definition at line 71 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mTimeLabel

Label* MailViewWindow::mTimeLabel

Definition at line 68 of file mailviewwindow.h.

Referenced by MailViewWindow().

◆ mUseMail2

bool MailViewWindow::mUseMail2

Definition at line 76 of file mailviewwindow.h.

Referenced by action(), MailViewWindow(), updateAttachButton(), and ~MailViewWindow().

The documentation for this class was generated from the following files: