~ubuntu-branches/ubuntu/trusty/manaplus/trusty-proposed

« back to all changes in this revision

Viewing changes to src/gui/widgets/window.h

  • Committer: Package Import Robot
  • Author(s): Patrick Matthäi
  • Date: 2013-07-11 10:09:41 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20130711100941-f0rwuvcwgl8ulqo8
Tags: 1.3.7.7.1-1
New upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
75
75
        /**
76
76
         * Sets the window container to be used by new windows.
77
77
         */
78
 
        static void setWindowContainer(WindowContainer *windowContainer);
 
78
        static void setWindowContainer(WindowContainer *const windowContainer);
79
79
 
80
80
        /**
81
81
         * Draws the window.
136
136
        /**
137
137
         * Sets the minimum width of the window.
138
138
         */
139
 
        void setMinWidth(int width);
 
139
        void setMinWidth(const int width);
140
140
 
141
141
        int getMinWidth() const A_WARN_UNUSED
142
142
        { return mMinWinWidth; }
144
144
        /**
145
145
         * Sets the minimum height of the window.
146
146
         */
147
 
        void setMinHeight(int height);
 
147
        void setMinHeight(const int height);
148
148
 
149
149
        int getMinHeight() const A_WARN_UNUSED
150
150
        { return mMinWinHeight; }
210
210
         * Overloads window setVisible by Guichan to allow sticky window
211
211
         * handling, or not, if you force the sticky state.
212
212
         */
213
 
        void setVisible(bool visible, bool forceSticky);
 
213
        void setVisible(const bool visible, const bool forceSticky);
214
214
 
215
215
        /**
216
216
         * Returns whether the window is visible by default.
221
221
        /**
222
222
         * Sets whether the window is visible by default.
223
223
         */
224
 
        void setDefaultVisible(bool save)
 
224
        void setDefaultVisible(const bool save)
225
225
        { mDefaultVisible = save; }
226
226
 
227
227
        /**
233
233
        /**
234
234
         * Sets whether the window will save it's visibility.
235
235
         */
236
 
        void setSaveVisible(bool save)
 
236
        void setSaveVisible(const bool save)
237
237
        { mSaveVisible = save; }
238
238
 
239
239
        /**
314
314
         * Set the default win pos and size.
315
315
         * (which can be different of the actual ones.)
316
316
         */
317
 
        void setDefaultSize(int defaultX, int defaultY,
 
317
        void setDefaultSize(const int defaultX, const int defaultY,
318
318
                            int defaultWidth, int defaultHeight);
319
319
 
320
320
        /**
328
328
         * This version of setDefaultSize sets the window's position based
329
329
         * on a relative enumerated position, rather than a coordinate position.
330
330
         */
331
 
        void setDefaultSize(int defaultWidth, int defaultHeight,
 
331
        void setDefaultSize(const int defaultWidth, const int defaultHeight,
332
332
                            const ImageRect::ImagePosition &position,
333
333
                            const int offsetx = 0, const int offsetY = 0);
334
334
 
397
397
         /**
398
398
         * Allows the windows modal status to change
399
399
         */
400
 
        void setModal(bool modal);
 
400
        void setModal(const bool modal);
401
401
 
402
402
        /**
403
403
         * Gets the alpha value used by the window, in a GUIChan usable format.
404
404
         */
405
 
        int getGuiAlpha() A_WARN_UNUSED;
 
405
        int getGuiAlpha() const A_WARN_UNUSED;
406
406
 
407
407
        gcn::Rectangle getWindowArea() const A_WARN_UNUSED;
408
408
 
417
417
        bool isWindowVisible() const A_WARN_UNUSED
418
418
        { return mVisible; }
419
419
 
 
420
#ifdef USE_PROFILER
 
421
        virtual void logic();
 
422
#endif
 
423
 
420
424
    protected:
421
425
        bool canMove() const A_WARN_UNUSED;
422
426
 
423
427
        int getOption(const std::string &name,
424
428
                      const int def = 0) const A_WARN_UNUSED;
425
429
 
426
 
        bool getOptionBool(std::string name) A_WARN_UNUSED;
 
430
        bool getOptionBool(const std::string &name) const A_WARN_UNUSED;
427
431
 
428
432
        void setTitlePadding(int p)
429
433
        { mTitlePadding = p; }
472
476
        gcn::Rectangle mStickyRect;   /**< Sticky button rectangle */
473
477
        gcn::Rectangle mGripRect;     /**< Resize grip rectangle */
474
478
        std::string mWindowName;      /**< Name of the window */
475
 
        bool mShowTitle;              /**< Window has a title bar */
476
 
        bool mModal;                  /**< Window is modal */
477
 
        bool mCloseButton;            /**< Window has a close button */
478
 
        bool mDefaultVisible;         /**< Window's default visibility */
479
 
        bool mSaveVisible;            /**< Window will save visibility */
480
 
        bool mStickyButton;           /**< Window has a sticky button */
481
 
        bool mSticky;                 /**< Window resists hiding*/
482
 
        bool mStickyButtonLock;       /**< Window locked if sticky enabled*/
483
479
        int mMinWinWidth;             /**< Minimum window width */
484
480
        int mMinWinHeight;            /**< Minimum window height */
485
481
        int mMaxWinWidth;             /**< Maximum window width */
503
499
        int mGripPadding;
504
500
        int mResizeHandles;
505
501
        int mOldResizeHandles;
 
502
        gcn::Font *mCaptionFont;
 
503
        bool mShowTitle;              /**< Window has a title bar */
 
504
        bool mModal;                  /**< Window is modal */
 
505
        bool mCloseButton;            /**< Window has a close button */
 
506
        bool mDefaultVisible;         /**< Window's default visibility */
 
507
        bool mSaveVisible;            /**< Window will save visibility */
 
508
        bool mStickyButton;           /**< Window has a sticky button */
 
509
        bool mSticky;                 /**< Window resists hiding*/
 
510
        bool mStickyButtonLock;       /**< Window locked if sticky enabled*/
506
511
        bool mPlayVisibleSound;
507
 
        gcn::Font *mCaptionFont;
508
512
};
509
513
 
510
514
#endif  // GUI_WIDGETS_WINDOW_H