2017-11-04 07:03:53 +01:00
|
|
|
/***********************************************************************
|
|
|
|
* fwidget.h - Intermediate base class for all widget objects *
|
|
|
|
* *
|
|
|
|
* This file is part of the Final Cut widget toolkit *
|
|
|
|
* *
|
2020-01-20 21:40:00 +01:00
|
|
|
* Copyright 2015-2020 Markus Gans *
|
2017-11-04 07:03:53 +01:00
|
|
|
* *
|
|
|
|
* The Final Cut is free software; you can redistribute it and/or *
|
|
|
|
* modify it under the terms of the GNU Lesser General Public License *
|
|
|
|
* as published by the Free Software Foundation; either version 3 of *
|
|
|
|
* the License, or (at your option) any later version. *
|
|
|
|
* *
|
|
|
|
* The Final Cut is distributed in the hope that it will be useful, *
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
|
|
|
* GNU Lesser General Public License for more details. *
|
|
|
|
* *
|
|
|
|
* You should have received a copy of the GNU Lesser General Public *
|
|
|
|
* License along with this program. If not, see *
|
|
|
|
* <http://www.gnu.org/licenses/>. *
|
|
|
|
***********************************************************************/
|
2017-10-02 07:32:33 +02:00
|
|
|
|
|
|
|
/* Inheritance diagram
|
|
|
|
* ═══════════════════
|
|
|
|
*
|
|
|
|
* ▕▔▔▔▔▔▔▔▔▔▏ ▕▔▔▔▔▔▔▔▔▔▏
|
2017-10-29 14:27:50 +01:00
|
|
|
* ▕ FVTerm ▏ ▕ FObject ▏
|
2017-10-02 07:32:33 +02:00
|
|
|
* ▕▁▁▁▁▁▁▁▁▁▏ ▕▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* ▲ ▲
|
|
|
|
* │ │
|
|
|
|
* └─────┬─────┘
|
|
|
|
* │
|
|
|
|
* ▕▔▔▔▔▔▔▔▔▔▏1 1▕▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* ▕ FWidget ▏-┬- - - -▕ FStatusBar ▏
|
|
|
|
* ▕▁▁▁▁▁▁▁▁▁▏ : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : 1▕▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FMenuBar ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FString ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FKeyEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FMouseEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FWheelEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FFocusEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FAccelEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FResizeEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FShowEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* :- - - -▕ FHideEvent ▏
|
|
|
|
* : ▕▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
* :
|
|
|
|
* : *▕▔▔▔▔▔▔▔▔▔▔▔▔▔▏
|
|
|
|
* └- - - -▕ FCloseEvent ▏
|
|
|
|
* ▕▁▁▁▁▁▁▁▁▁▁▁▁▁▏
|
|
|
|
*/
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2017-04-09 20:08:53 +02:00
|
|
|
#ifndef FWIDGET_H
|
|
|
|
#define FWIDGET_H
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2017-10-31 00:41:59 +01:00
|
|
|
#if !defined (USE_FINAL_H) && !defined (COMPILE_FINAL_CUT)
|
|
|
|
#error "Only <final/final.h> can be included directly."
|
|
|
|
#endif
|
|
|
|
|
2019-10-05 23:20:07 +02:00
|
|
|
#include <functional>
|
2018-11-20 21:11:04 +01:00
|
|
|
#include <utility>
|
2017-09-11 03:06:02 +02:00
|
|
|
#include <vector>
|
|
|
|
|
2017-09-17 21:32:46 +02:00
|
|
|
#include "final/fvterm.h"
|
2019-07-21 23:31:21 +02:00
|
|
|
#include "final/fobject.h"
|
|
|
|
#include "final/fpoint.h"
|
|
|
|
#include "final/frect.h"
|
|
|
|
#include "final/fsize.h"
|
|
|
|
#include "final/ftypes.h"
|
2015-09-25 21:37:19 +02:00
|
|
|
|
2015-09-24 19:01:27 +02:00
|
|
|
// Callback macros
|
2017-04-09 20:08:53 +02:00
|
|
|
#define F_FUNCTION_CALLBACK(h) \
|
2019-10-05 23:20:07 +02:00
|
|
|
reinterpret_cast<finalcut::FWidget::FCallbackPtr>((h))
|
2015-09-24 19:01:27 +02:00
|
|
|
|
2017-04-09 20:08:53 +02:00
|
|
|
#define F_METHOD_CALLBACK(i,h) \
|
2019-10-05 23:20:07 +02:00
|
|
|
reinterpret_cast<finalcut::FWidget*>((i)), \
|
|
|
|
std::bind ( reinterpret_cast<finalcut::FWidget::FMemberCallback>((h)) \
|
|
|
|
, reinterpret_cast<finalcut::FWidget*>((i)) \
|
|
|
|
, std::placeholders::_1 \
|
|
|
|
, std::placeholders::_2 )
|
2018-09-20 23:59:01 +02:00
|
|
|
|
|
|
|
namespace finalcut
|
|
|
|
{
|
2015-09-24 19:01:27 +02:00
|
|
|
|
2016-10-01 23:18:49 +02:00
|
|
|
// class forward declaration
|
2015-08-09 23:44:11 +02:00
|
|
|
class FMenuBar;
|
2019-07-21 23:31:21 +02:00
|
|
|
class FRect;
|
|
|
|
class FResizeEvent;
|
|
|
|
class FSize;
|
|
|
|
class FStatusBar;
|
|
|
|
class FWidgetColors;
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// class FWidget
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
|
2017-10-30 20:29:00 +01:00
|
|
|
class FWidget : public FVTerm, public FObject
|
2015-05-23 13:35:12 +02:00
|
|
|
{
|
2017-09-11 03:06:02 +02:00
|
|
|
public:
|
2020-04-13 12:40:11 +02:00
|
|
|
// Using-declaration
|
2017-09-11 03:06:02 +02:00
|
|
|
using FVTerm::setColor;
|
2019-01-27 13:44:13 +01:00
|
|
|
using FVTerm::print;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-10-08 04:37:19 +02:00
|
|
|
struct FAccelerator
|
2017-09-11 03:06:02 +02:00
|
|
|
{
|
2019-09-08 02:04:24 +02:00
|
|
|
alignas(8) FKey key;
|
2017-09-11 03:06:02 +02:00
|
|
|
FWidget* object;
|
|
|
|
};
|
|
|
|
|
|
|
|
// Typedefs
|
2019-10-06 22:35:00 +02:00
|
|
|
typedef std::vector<FWidget*> FWidgetList;
|
2019-10-08 04:37:19 +02:00
|
|
|
typedef std::vector<FAccelerator> FAcceleratorList;
|
2019-10-05 23:20:07 +02:00
|
|
|
typedef void (*FCallbackPtr)(FWidget*, FDataPtr);
|
2018-12-27 00:14:46 +01:00
|
|
|
typedef void (FWidget::*FMemberCallback)(FWidget*, FDataPtr);
|
2019-10-05 23:20:07 +02:00
|
|
|
typedef std::function<void(FWidget*, FDataPtr)> FCallback;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-10-08 04:37:19 +02:00
|
|
|
struct FWidgetFlags // Properties of a widget ⚑
|
2018-11-04 23:12:41 +01:00
|
|
|
{
|
2018-11-05 23:19:03 +01:00
|
|
|
uInt32 shadow : 1;
|
|
|
|
uInt32 trans_shadow : 1;
|
|
|
|
uInt32 active : 1;
|
|
|
|
uInt32 visible : 1;
|
|
|
|
uInt32 shown : 1;
|
2019-01-09 20:05:29 +01:00
|
|
|
uInt32 hidden : 1;
|
2018-11-05 23:19:03 +01:00
|
|
|
uInt32 focus : 1;
|
|
|
|
uInt32 focusable : 1;
|
|
|
|
uInt32 scrollable : 1;
|
|
|
|
uInt32 resizeable : 1;
|
|
|
|
uInt32 modal : 1;
|
|
|
|
uInt32 visible_cursor : 1;
|
|
|
|
uInt32 window_widget : 1;
|
|
|
|
uInt32 dialog_widget : 1;
|
|
|
|
uInt32 menu_widget : 1;
|
|
|
|
uInt32 always_on_top : 1;
|
|
|
|
uInt32 flat : 1;
|
2020-04-09 12:38:35 +02:00
|
|
|
uInt32 no_border : 1;
|
2018-11-05 23:19:03 +01:00
|
|
|
uInt32 no_underline : 1;
|
2020-04-09 12:38:35 +02:00
|
|
|
uInt32 : 13; // padding bits
|
2018-11-04 23:12:41 +01:00
|
|
|
};
|
2018-11-04 23:00:06 +01:00
|
|
|
|
2017-09-11 03:06:02 +02:00
|
|
|
// Constructor
|
2018-12-10 01:48:26 +01:00
|
|
|
explicit FWidget (FWidget* = nullptr, bool = false);
|
2018-12-24 18:11:16 +01:00
|
|
|
|
2018-12-09 22:04:55 +01:00
|
|
|
// Disable copy constructor
|
|
|
|
FWidget (const FWidget&) = delete;
|
2018-12-24 18:11:16 +01:00
|
|
|
|
2017-09-11 03:06:02 +02:00
|
|
|
// Destructor
|
2020-02-19 21:59:13 +01:00
|
|
|
~FWidget() override;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2018-12-09 22:04:55 +01:00
|
|
|
// Disable assignment operator (=)
|
|
|
|
FWidget& operator = (const FWidget&) = delete;
|
|
|
|
|
2017-09-11 03:06:02 +02:00
|
|
|
// Accessors
|
2019-10-20 20:06:33 +02:00
|
|
|
const FString getClassName() const override;
|
|
|
|
FWidget* getRootWidget() const;
|
|
|
|
FWidget* getParentWidget() const;
|
|
|
|
static FWidget*& getMainWidget();
|
|
|
|
static FWidget*& getActiveWindow();
|
|
|
|
static FWidget*& getFocusWidget();
|
|
|
|
static FWidget*& getClickedWidget();
|
|
|
|
static FWidget*& getOpenMenu();
|
|
|
|
static FWidget*& getMoveSizeWidget();
|
|
|
|
static FWidgetList*& getWindowList();
|
|
|
|
static FMenuBar* getMenuBar();
|
|
|
|
static FStatusBar* getStatusBar();
|
|
|
|
virtual FWidget* getFirstFocusableWidget (FObjectList);
|
|
|
|
virtual FWidget* getLastFocusableWidget (FObjectList);
|
|
|
|
const FAcceleratorList& getAcceleratorList() const;
|
|
|
|
FAcceleratorList& setAcceleratorList();
|
|
|
|
FString getStatusbarMessage() const;
|
|
|
|
FColor getForegroundColor() const; // get the primary
|
|
|
|
FColor getBackgroundColor() const; // widget colors
|
|
|
|
std::vector<bool>& doubleFlatLine_ref (fc::sides);
|
2019-10-06 22:35:00 +02:00
|
|
|
// Positioning and sizes accessors...
|
2019-10-20 20:06:33 +02:00
|
|
|
int getX() const;
|
|
|
|
int getY() const;
|
|
|
|
const FPoint getPos() const;
|
|
|
|
int getTermX() const;
|
|
|
|
int getTermY() const;
|
|
|
|
const FPoint getTermPos() const;
|
|
|
|
std::size_t getWidth() const;
|
|
|
|
std::size_t getHeight() const;
|
|
|
|
const FSize getSize() const;
|
|
|
|
int getTopPadding() const;
|
|
|
|
int getLeftPadding() const;
|
|
|
|
int getBottomPadding() const;
|
|
|
|
int getRightPadding() const;
|
|
|
|
std::size_t getClientWidth() const;
|
|
|
|
std::size_t getClientHeight() const;
|
|
|
|
std::size_t getMaxWidth() const;
|
|
|
|
std::size_t getMaxHeight() const;
|
|
|
|
const FSize& getShadow() const;
|
|
|
|
const FRect& getGeometry() const;
|
|
|
|
const FRect& getGeometryWithShadow();
|
|
|
|
const FRect& getTermGeometry();
|
|
|
|
const FRect& getTermGeometryWithShadow();
|
|
|
|
std::size_t getDesktopWidth();
|
|
|
|
std::size_t getDesktopHeight();
|
|
|
|
const FWidgetFlags& getFlags() const;
|
|
|
|
FPoint getCursorPos();
|
|
|
|
FPoint getPrintPos();
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Mutators
|
2019-10-20 20:06:33 +02:00
|
|
|
static void setMainWidget (FWidget*);
|
|
|
|
static void setFocusWidget (FWidget*);
|
|
|
|
static void setClickedWidget (FWidget*);
|
|
|
|
static void setMoveSizeWidget (FWidget*);
|
|
|
|
static void setActiveWindow (FWidget*);
|
|
|
|
static void setOpenMenu (FWidget*);
|
|
|
|
virtual void setStatusbarMessage (const FString&);
|
|
|
|
bool setVisible (bool);
|
|
|
|
bool setVisible();
|
|
|
|
bool unsetVisible();
|
|
|
|
virtual bool setEnable (bool);
|
|
|
|
virtual bool setEnable();
|
|
|
|
virtual bool unsetEnable();
|
|
|
|
virtual bool setDisable();
|
|
|
|
virtual bool setVisibleCursor (bool); // input cursor visibility
|
|
|
|
virtual bool setVisibleCursor(); // for the widget
|
|
|
|
virtual bool unsetVisibleCursor();
|
|
|
|
virtual bool setFocus (bool);
|
|
|
|
virtual bool setFocus();
|
|
|
|
virtual bool unsetFocus();
|
|
|
|
void setFocusable();
|
|
|
|
void unsetFocusable();
|
|
|
|
bool ignorePadding (bool); // ignore padding from
|
|
|
|
bool ignorePadding(); // the parent widget
|
|
|
|
bool acceptPadding();
|
|
|
|
void setForegroundColor (FColor);
|
|
|
|
void setBackgroundColor (FColor);
|
|
|
|
void setColor();
|
|
|
|
FWidgetFlags& setFlags();
|
2019-10-06 22:35:00 +02:00
|
|
|
// Positioning and sizes mutators...
|
2019-10-20 20:06:33 +02:00
|
|
|
virtual void setX (int, bool = true);
|
|
|
|
virtual void setY (int, bool = true);
|
|
|
|
virtual void setPos (const FPoint&, bool = true);
|
|
|
|
virtual void setWidth (std::size_t, bool = true);
|
|
|
|
virtual void setHeight (std::size_t, bool = true);
|
|
|
|
virtual void setSize (const FSize&, bool = true);
|
|
|
|
void setTopPadding (int, bool = true);
|
|
|
|
void setLeftPadding (int, bool = true);
|
|
|
|
void setBottomPadding (int, bool = true);
|
|
|
|
void setRightPadding (int, bool = true);
|
|
|
|
void setTermSize (const FSize&);
|
|
|
|
virtual void setGeometry (const FRect&, bool = true);
|
|
|
|
virtual void setGeometry (const FPoint&, const FSize&, bool = true);
|
|
|
|
virtual void setShadowSize (const FSize&);
|
|
|
|
void setMinimumWidth (std::size_t);
|
|
|
|
void setMinimumHeight (std::size_t);
|
|
|
|
void setMinimumSize (const FSize&);
|
|
|
|
void setMaximumWidth (std::size_t);
|
2019-12-20 19:36:18 +01:00
|
|
|
void setMaximumHeight (std::size_t);
|
|
|
|
void setMaximumSize (const FSize&);
|
2019-10-20 20:06:33 +02:00
|
|
|
void setFixedSize (const FSize&);
|
|
|
|
bool setCursorPos (const FPoint&);
|
|
|
|
void unsetCursorPos();
|
|
|
|
void setPrintPos (const FPoint&);
|
|
|
|
void setDoubleFlatLine (fc::sides, bool = true);
|
|
|
|
void unsetDoubleFlatLine (fc::sides);
|
|
|
|
void setDoubleFlatLine (fc::sides, int, bool = true);
|
|
|
|
void unsetDoubleFlatLine (fc::sides, int);
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Inquiries
|
2019-10-20 20:06:33 +02:00
|
|
|
bool isRootWidget() const;
|
|
|
|
bool isWindowWidget() const;
|
|
|
|
bool isDialogWidget() const;
|
|
|
|
bool isMenuWidget() const;
|
|
|
|
bool isVisible() const;
|
|
|
|
bool isShown() const;
|
2019-12-16 11:14:24 +01:00
|
|
|
bool isHidden() const;
|
2019-10-20 20:06:33 +02:00
|
|
|
bool isEnabled() const;
|
|
|
|
bool hasVisibleCursor() const;
|
|
|
|
bool hasFocus() const;
|
|
|
|
bool acceptFocus() const; // is focusable
|
|
|
|
bool isPaddingIgnored();
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Methods
|
2019-10-20 20:06:33 +02:00
|
|
|
FWidget* childWidgetAt (const FPoint&);
|
|
|
|
int numOfFocusableChildren();
|
|
|
|
virtual bool close();
|
|
|
|
void clearStatusbarMessage();
|
|
|
|
void addCallback ( const FString&
|
|
|
|
, FCallback
|
|
|
|
, FDataPtr = nullptr );
|
|
|
|
void addCallback ( const FString&
|
|
|
|
, FWidget*
|
|
|
|
, FCallback
|
|
|
|
, FDataPtr = nullptr );
|
|
|
|
void delCallback (FCallback);
|
2020-04-13 12:40:11 +02:00
|
|
|
void delCallback (const FWidget*);
|
2019-10-20 20:06:33 +02:00
|
|
|
void delCallbacks();
|
|
|
|
void emitCallback (const FString&);
|
|
|
|
void addAccelerator (FKey);
|
|
|
|
virtual void addAccelerator (FKey, FWidget*);
|
|
|
|
void delAccelerator ();
|
|
|
|
virtual void delAccelerator (FWidget*);
|
|
|
|
virtual void redraw();
|
|
|
|
virtual void resize();
|
|
|
|
virtual void show();
|
|
|
|
virtual void hide();
|
|
|
|
virtual bool focusFirstChild(); // widget focusing
|
|
|
|
virtual bool focusLastChild();
|
|
|
|
FPoint termToWidgetPos (const FPoint&);
|
|
|
|
void print (const FPoint&) override;
|
|
|
|
virtual void move (const FPoint&);
|
|
|
|
virtual void drawBorder();
|
|
|
|
static void quit();
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
protected:
|
2020-04-14 23:46:42 +02:00
|
|
|
struct FCallbackData; // forward declaration
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Typedefs
|
2019-10-08 04:37:19 +02:00
|
|
|
typedef std::vector<FCallbackData> FCallbackObjects;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2017-10-27 23:28:37 +02:00
|
|
|
// Accessor
|
2019-10-20 20:06:33 +02:00
|
|
|
FTermArea* getPrintArea() override;
|
|
|
|
const FWidgetColors& getFWidgetColors() const;
|
|
|
|
static uInt getModalDialogCounter();
|
|
|
|
static FWidgetList*& getDialogList();
|
|
|
|
static FWidgetList*& getAlwaysOnTopList();
|
|
|
|
static FWidgetList*& getWidgetCloseList();
|
2020-04-13 12:40:11 +02:00
|
|
|
void addPreprocessingHandler ( const FVTerm*
|
|
|
|
, const FPreprocessingFunction& ) override;
|
|
|
|
void delPreprocessingHandler (const FVTerm*) override;
|
2017-10-27 23:28:37 +02:00
|
|
|
|
|
|
|
// Inquiry
|
2019-10-20 20:06:33 +02:00
|
|
|
bool isChildPrintArea() const;
|
2017-10-27 23:28:37 +02:00
|
|
|
|
2017-09-11 03:06:02 +02:00
|
|
|
// Mutators
|
2019-10-20 20:06:33 +02:00
|
|
|
virtual void setStatusBar (FStatusBar*);
|
|
|
|
virtual void setMenuBar (FMenuBar*);
|
|
|
|
FWidgetColors& setFWidgetColors();
|
|
|
|
static uInt& setModalDialogCounter();
|
2020-01-09 19:21:16 +01:00
|
|
|
void setParentOffset();
|
|
|
|
void setTermOffset();
|
|
|
|
void setTermOffsetWithPadding();
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Methods
|
2019-10-20 20:06:33 +02:00
|
|
|
virtual void adjustSize();
|
|
|
|
void adjustSizeGlobal();
|
|
|
|
void hideArea (const FSize&);
|
|
|
|
virtual bool focusNextChild(); // Change child...
|
|
|
|
virtual bool focusPrevChild(); // ...focus
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// Event handlers
|
2019-10-20 20:06:33 +02:00
|
|
|
bool event (FEvent*) override;
|
|
|
|
virtual void onKeyPress (FKeyEvent*);
|
|
|
|
virtual void onKeyUp (FKeyEvent*);
|
|
|
|
virtual void onKeyDown (FKeyEvent*);
|
|
|
|
virtual void onMouseDown (FMouseEvent*);
|
|
|
|
virtual void onMouseUp (FMouseEvent*);
|
|
|
|
virtual void onMouseDoubleClick (FMouseEvent*);
|
|
|
|
virtual void onWheel (FWheelEvent*);
|
|
|
|
virtual void onMouseMove (FMouseEvent*);
|
|
|
|
virtual void onFocusIn (FFocusEvent*);
|
|
|
|
virtual void onFocusOut (FFocusEvent*);
|
|
|
|
virtual void onChildFocusIn (FFocusEvent*);
|
|
|
|
virtual void onChildFocusOut (FFocusEvent*);
|
|
|
|
virtual void onAccel (FAccelEvent*);
|
|
|
|
virtual void onResize (FResizeEvent*);
|
|
|
|
virtual void onShow (FShowEvent*);
|
|
|
|
virtual void onHide (FHideEvent*);
|
|
|
|
virtual void onClose (FCloseEvent*);
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
private:
|
|
|
|
// Methods
|
2020-03-05 21:30:54 +01:00
|
|
|
void initRootWidget();
|
2019-10-20 20:06:33 +02:00
|
|
|
void finish();
|
|
|
|
void insufficientSpaceAdjust();
|
|
|
|
void KeyPressEvent (FKeyEvent*);
|
|
|
|
void KeyDownEvent (FKeyEvent*);
|
2020-04-13 12:40:11 +02:00
|
|
|
void emitWheelCallback (const FWheelEvent*);
|
2019-11-16 15:16:44 +01:00
|
|
|
void setWindowFocus (bool);
|
2019-10-20 20:06:33 +02:00
|
|
|
FCallbackPtr getCallbackPtr (FCallback);
|
2020-04-15 23:17:42 +02:00
|
|
|
bool changeFocus (FWidget*, FWidget*, fc::FocusTypes);
|
2019-10-20 20:06:33 +02:00
|
|
|
void processDestroy();
|
|
|
|
virtual void draw();
|
|
|
|
void drawWindows();
|
|
|
|
void drawChildren();
|
|
|
|
static void setColorTheme();
|
2019-11-16 15:16:44 +01:00
|
|
|
void setStatusbarText (bool);
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-09-04 23:57:31 +02:00
|
|
|
// Data members
|
2019-10-20 20:06:33 +02:00
|
|
|
FPoint widget_cursor_position{-1, -1};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
struct widget_size_hints
|
|
|
|
{
|
2018-12-03 03:22:36 +01:00
|
|
|
widget_size_hints() = default;
|
|
|
|
~widget_size_hints() = default;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-01-21 03:42:18 +01:00
|
|
|
void setMinimum (const FSize& s)
|
2017-09-11 03:06:02 +02:00
|
|
|
{
|
2019-01-21 03:42:18 +01:00
|
|
|
min_width = s.getWidth();
|
|
|
|
min_height = s.getHeight();
|
2017-09-11 03:06:02 +02:00
|
|
|
}
|
|
|
|
|
2019-01-21 03:42:18 +01:00
|
|
|
void setMaximum (const FSize& s)
|
2017-09-11 03:06:02 +02:00
|
|
|
{
|
2019-01-21 03:42:18 +01:00
|
|
|
max_width = s.getWidth();
|
|
|
|
max_height = s.getHeight();
|
2017-09-11 03:06:02 +02:00
|
|
|
}
|
|
|
|
|
2018-12-03 03:22:36 +01:00
|
|
|
std::size_t min_width{0};
|
|
|
|
std::size_t min_height{0};
|
|
|
|
std::size_t max_width{INT_MAX};
|
|
|
|
std::size_t max_height{INT_MAX};
|
|
|
|
} size_hints{};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
struct dbl_line_mask
|
|
|
|
{
|
2018-12-03 03:22:36 +01:00
|
|
|
dbl_line_mask() = default;
|
|
|
|
~dbl_line_mask() = default;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2018-12-03 03:22:36 +01:00
|
|
|
std::vector<bool> top{};
|
|
|
|
std::vector<bool> right{};
|
|
|
|
std::vector<bool> bottom{};
|
|
|
|
std::vector<bool> left{};
|
|
|
|
} double_flatline_mask{};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
struct widget_padding
|
|
|
|
{
|
2018-12-03 03:22:36 +01:00
|
|
|
widget_padding() = default;
|
|
|
|
~widget_padding() = default;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2018-12-03 03:22:36 +01:00
|
|
|
int top{0};
|
|
|
|
int left{0};
|
|
|
|
int bottom{0};
|
|
|
|
int right{0};
|
|
|
|
} padding{};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-10-20 20:06:33 +02:00
|
|
|
struct FWidgetFlags flags{};
|
|
|
|
bool ignore_padding{false};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// widget size
|
2019-10-20 20:06:33 +02:00
|
|
|
FRect wsize{1, 1, 1, 1};
|
|
|
|
FRect adjust_wsize{1, 1, 1, 1};
|
|
|
|
FRect adjust_wsize_term{};
|
|
|
|
FRect adjust_wsize_shadow{};
|
|
|
|
FRect adjust_wsize_term_shadow{};
|
2017-09-11 03:06:02 +02:00
|
|
|
// widget offset
|
2019-10-20 20:06:33 +02:00
|
|
|
FRect woffset{};
|
2017-09-11 03:06:02 +02:00
|
|
|
// offset of the widget client area
|
2019-10-20 20:06:33 +02:00
|
|
|
FRect wclient_offset{};
|
2017-09-11 03:06:02 +02:00
|
|
|
// widget shadow size (on the right and bottom side)
|
2019-10-20 20:06:33 +02:00
|
|
|
FSize wshadow{0, 0};
|
2017-09-11 03:06:02 +02:00
|
|
|
|
|
|
|
// default widget foreground and background color
|
2019-10-20 20:06:33 +02:00
|
|
|
FColor foreground_color{fc::Default};
|
|
|
|
FColor background_color{fc::Default};
|
|
|
|
FString statusbar_message{};
|
|
|
|
FAcceleratorList accelerator_list{};
|
|
|
|
FCallbackObjects callback_objects{};
|
|
|
|
|
|
|
|
static FStatusBar* statusbar;
|
|
|
|
static FMenuBar* menubar;
|
|
|
|
static FWidget* main_widget;
|
|
|
|
static FWidget* active_window;
|
|
|
|
static FWidget* focus_widget;
|
|
|
|
static FWidget* clicked_widget;
|
|
|
|
static FWidget* open_menu;
|
|
|
|
static FWidget* move_size_widget;
|
|
|
|
static FWidget* show_root_widget;
|
|
|
|
static FWidget* redraw_root_widget;
|
|
|
|
static FWidgetList* window_list;
|
|
|
|
static FWidgetList* dialog_list;
|
|
|
|
static FWidgetList* always_on_top_list;
|
|
|
|
static FWidgetList* close_widget;
|
|
|
|
static FWidgetColors wcolors;
|
|
|
|
static uInt modal_dialog_counter;
|
|
|
|
static bool init_desktop;
|
|
|
|
static bool hideable;
|
2017-09-11 03:06:02 +02:00
|
|
|
|
2019-01-12 09:11:22 +01:00
|
|
|
// Friend classes
|
2017-09-11 03:06:02 +02:00
|
|
|
friend class FToggleButton;
|
|
|
|
friend class FScrollView;
|
2019-10-06 22:35:00 +02:00
|
|
|
|
|
|
|
// Friend functions
|
|
|
|
friend void detectTermSize();
|
|
|
|
friend void drawShadow (FWidget*);
|
2019-10-08 04:37:19 +02:00
|
|
|
friend void drawTransparentShadow (FWidget*);
|
|
|
|
friend void drawBlockShadow (FWidget*);
|
2019-10-06 22:35:00 +02:00
|
|
|
friend void clearShadow (FWidget*);
|
|
|
|
friend void drawFlatBorder (FWidget*);
|
|
|
|
friend void clearFlatBorder (FWidget*);
|
2015-05-23 13:35:12 +02:00
|
|
|
};
|
|
|
|
|
2020-04-14 23:46:42 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
// struct FWidget::FCallbackData
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
struct FWidget::FCallbackData
|
|
|
|
{
|
|
|
|
// Constructor
|
|
|
|
FCallbackData()
|
|
|
|
: cb_signal()
|
|
|
|
, cb_instance(nullptr)
|
|
|
|
, cb_function()
|
|
|
|
, data(nullptr)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
FCallbackData (FString s, FWidget* i, FCallback c, FDataPtr d)
|
|
|
|
: cb_signal(s)
|
|
|
|
, cb_instance(i)
|
|
|
|
, cb_function(c)
|
|
|
|
, data(d)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
FCallbackData (const FCallbackData& c) // copy constructor
|
|
|
|
: cb_signal(c.cb_signal)
|
|
|
|
, cb_instance(c.cb_instance)
|
|
|
|
, cb_function(c.cb_function)
|
|
|
|
, data(c.data)
|
|
|
|
{ }
|
|
|
|
|
|
|
|
FCallbackData (FCallbackData&& c) noexcept // move constructor
|
|
|
|
: cb_signal(c.cb_signal)
|
|
|
|
, cb_instance(c.cb_instance)
|
|
|
|
, cb_function(c.cb_function)
|
|
|
|
, data(c.data)
|
|
|
|
{
|
|
|
|
c.cb_signal.clear();
|
|
|
|
c.cb_instance = nullptr;
|
|
|
|
c.cb_function = nullptr;
|
|
|
|
c.data = nullptr;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Destructor
|
|
|
|
~FCallbackData()
|
|
|
|
{ }
|
|
|
|
|
|
|
|
// Overloaded operators
|
|
|
|
FCallbackData& operator = (const FCallbackData& c)
|
|
|
|
{
|
|
|
|
cb_signal = c.cb_signal;
|
|
|
|
cb_instance = c.cb_instance;
|
|
|
|
cb_function = c.cb_function;
|
|
|
|
data = c.data;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
FCallbackData& operator = (FCallbackData&& c) noexcept
|
|
|
|
{
|
|
|
|
cb_signal = c.cb_signal;
|
|
|
|
cb_instance = c.cb_instance;
|
|
|
|
cb_function = c.cb_function;
|
|
|
|
data = c.data;
|
|
|
|
c.cb_signal.clear();
|
|
|
|
c.cb_instance = nullptr;
|
|
|
|
c.cb_function = nullptr;
|
|
|
|
c.data = nullptr;
|
|
|
|
return *this;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Data members
|
|
|
|
FString cb_signal{};
|
|
|
|
FWidget* cb_instance{};
|
|
|
|
FCallback cb_function{};
|
|
|
|
FDataPtr data{};
|
|
|
|
};
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2019-08-11 18:15:57 +02:00
|
|
|
// non-member function forward declarations
|
2019-10-08 04:37:19 +02:00
|
|
|
// implemented in fwidget_functions.cpp
|
2019-08-11 18:15:57 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-06 22:35:00 +02:00
|
|
|
void detectTermSize();
|
2020-02-02 22:34:27 +01:00
|
|
|
bool isFocusNextKey (const FKey);
|
|
|
|
bool isFocusPrevKey (const FKey);
|
2019-08-11 20:07:39 +02:00
|
|
|
FKey getHotkey (const FString&);
|
2019-10-01 23:14:00 +02:00
|
|
|
std::size_t getHotkeyPos (const FString& src, FString& dest);
|
|
|
|
void setHotkeyViaString (FWidget*, const FString&);
|
2019-10-06 22:35:00 +02:00
|
|
|
void drawShadow (FWidget*);
|
2019-10-08 04:37:19 +02:00
|
|
|
void drawTransparentShadow (FWidget*);
|
|
|
|
void drawBlockShadow (FWidget*);
|
2019-10-06 22:35:00 +02:00
|
|
|
void clearShadow (FWidget*);
|
|
|
|
void drawFlatBorder (FWidget*);
|
|
|
|
void clearFlatBorder (FWidget*);
|
2020-04-13 12:40:11 +02:00
|
|
|
void checkBorder (const FWidget*, FRect&);
|
|
|
|
void drawBorder (FWidget*, const FRect&);
|
|
|
|
void drawListBorder (FWidget*, const FRect&);
|
2019-10-08 04:37:19 +02:00
|
|
|
void drawBox (FWidget*, const FRect&);
|
|
|
|
void drawNewFontBox (FWidget*, const FRect&);
|
2019-11-06 02:40:47 +01:00
|
|
|
void drawNewFontListBox (FWidget*, const FRect&);
|
2019-10-06 22:35:00 +02:00
|
|
|
|
2019-08-11 18:15:57 +02:00
|
|
|
|
2015-10-17 19:40:43 +02:00
|
|
|
// FWidget inline functions
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-05 23:20:07 +02:00
|
|
|
inline const FString FWidget::getClassName() const
|
2015-05-23 13:35:12 +02:00
|
|
|
{ return "FWidget"; }
|
|
|
|
|
2018-10-21 21:06:52 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getMainWidget()
|
|
|
|
{ return main_widget; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getActiveWindow() // returns active FWindow object
|
|
|
|
{ return active_window; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getFocusWidget()
|
|
|
|
{ return focus_widget; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getClickedWidget()
|
|
|
|
{ return clicked_widget; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getOpenMenu()
|
|
|
|
{ return open_menu; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget*& FWidget::getMoveSizeWidget()
|
|
|
|
{ return move_size_widget; }
|
|
|
|
|
2019-09-01 23:29:27 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-06 22:35:00 +02:00
|
|
|
inline FWidget::FWidgetList*& FWidget::getWindowList()
|
2019-09-01 23:29:27 +02:00
|
|
|
{ return window_list; }
|
|
|
|
|
2018-10-21 21:06:52 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FMenuBar* FWidget::getMenuBar()
|
|
|
|
{ return menubar; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FStatusBar* FWidget::getStatusBar()
|
|
|
|
{ return statusbar; }
|
|
|
|
|
2019-10-06 22:35:00 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-20 20:06:33 +02:00
|
|
|
inline const FWidget::FAcceleratorList& FWidget::getAcceleratorList() const
|
|
|
|
{ return accelerator_list; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidget::FAcceleratorList& FWidget::setAcceleratorList()
|
2019-10-06 22:35:00 +02:00
|
|
|
{ return accelerator_list; }
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
2016-11-02 00:37:58 +01:00
|
|
|
inline FString FWidget::getStatusbarMessage() const
|
2015-05-23 13:35:12 +02:00
|
|
|
{ return statusbar_message; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-11-13 02:51:41 +01:00
|
|
|
inline FColor FWidget::getForegroundColor() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return foreground_color; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-11-13 02:51:41 +01:00
|
|
|
inline FColor FWidget::getBackgroundColor() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return background_color; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline int FWidget::getX() const // x-position relative to the widget
|
|
|
|
{ return adjust_wsize.getX(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline int FWidget::getY() const // y-position relative to the widget
|
|
|
|
{ return adjust_wsize.getY(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2015-09-27 16:00:13 +02:00
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline const FPoint FWidget::getPos() const // position relative to the widget
|
|
|
|
{ return adjust_wsize.getPos(); }
|
2015-09-27 16:00:13 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline int FWidget::getTermX() const // x-position on terminal
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return woffset.getX1() + adjust_wsize.getX(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline int FWidget::getTermY() const // y-position on terminal
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return woffset.getY1() + adjust_wsize.getY(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline const FPoint FWidget::getTermPos() const // position on terminal
|
|
|
|
{ return FPoint(getTermX(), getTermY()); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getWidth() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return adjust_wsize.getWidth(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getHeight() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return adjust_wsize.getHeight(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2019-01-21 03:42:18 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline const FSize FWidget::getSize() const
|
|
|
|
{ return adjust_wsize.getSize(); }
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline int FWidget::getTopPadding() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return padding.top; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline int FWidget::getLeftPadding() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return padding.left; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline int FWidget::getBottomPadding() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return padding.bottom; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline int FWidget::getRightPadding() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return padding.right; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getClientWidth() const
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return wclient_offset.getWidth(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getClientHeight() const
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return wclient_offset.getHeight(); }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2016-09-11 16:48:39 +02:00
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getMaxWidth() const
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return woffset.getWidth(); }
|
2016-09-11 16:48:39 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getMaxHeight() const
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return woffset.getHeight(); }
|
2016-09-11 16:48:39 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-01-16 16:00:15 +01:00
|
|
|
inline const FSize& FWidget::getShadow() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return wshadow; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline const FRect& FWidget::getGeometry() const
|
2016-09-25 23:53:48 +02:00
|
|
|
{ return adjust_wsize; }
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline const FRect& FWidget::getGeometryWithShadow()
|
|
|
|
{
|
|
|
|
adjust_wsize_shadow.setCoordinates
|
|
|
|
(
|
|
|
|
adjust_wsize.x1_ref(),
|
|
|
|
adjust_wsize.y1_ref(),
|
2019-01-16 16:00:15 +01:00
|
|
|
adjust_wsize.x2_ref() + int(wshadow.width_ref()),
|
|
|
|
adjust_wsize.y2_ref() + int(wshadow.height_ref())
|
2016-09-25 23:53:48 +02:00
|
|
|
);
|
2018-02-10 17:35:09 +01:00
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
return adjust_wsize_shadow;
|
|
|
|
}
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline const FRect& FWidget::getTermGeometry()
|
|
|
|
{
|
|
|
|
adjust_wsize_term.setCoordinates
|
|
|
|
(
|
2019-09-09 19:13:38 +02:00
|
|
|
adjust_wsize.x1_ref() + woffset.x1_ref(),
|
|
|
|
adjust_wsize.y1_ref() + woffset.y1_ref(),
|
|
|
|
adjust_wsize.x2_ref() + woffset.x1_ref(),
|
|
|
|
adjust_wsize.y2_ref() + woffset.y1_ref()
|
2016-09-25 23:53:48 +02:00
|
|
|
);
|
2018-02-10 17:35:09 +01:00
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
return adjust_wsize_term;
|
|
|
|
}
|
2015-05-23 13:35:12 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2016-09-25 23:53:48 +02:00
|
|
|
inline const FRect& FWidget::getTermGeometryWithShadow()
|
|
|
|
{
|
|
|
|
adjust_wsize_term_shadow.setCoordinates
|
|
|
|
(
|
2019-09-09 19:13:38 +02:00
|
|
|
adjust_wsize.x1_ref() + woffset.x1_ref(),
|
|
|
|
adjust_wsize.y1_ref() + woffset.y1_ref(),
|
|
|
|
adjust_wsize.x2_ref() + woffset.x1_ref() + int(wshadow.width_ref()),
|
|
|
|
adjust_wsize.y2_ref() + woffset.y1_ref() + int(wshadow.height_ref())
|
2016-09-25 23:53:48 +02:00
|
|
|
);
|
2018-02-10 17:35:09 +01:00
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
return adjust_wsize_term_shadow;
|
|
|
|
}
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2017-12-30 21:27:17 +01:00
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getDesktopWidth()
|
2017-12-30 21:27:17 +01:00
|
|
|
{ return getColumnNumber(); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline std::size_t FWidget::getDesktopHeight()
|
2017-12-30 21:27:17 +01:00
|
|
|
{ return getLineNumber(); }
|
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-08 04:37:19 +02:00
|
|
|
inline const FWidget::FWidgetFlags& FWidget::getFlags() const
|
2016-11-02 00:37:58 +01:00
|
|
|
{ return flags; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FPoint FWidget::getCursorPos()
|
|
|
|
{ return widget_cursor_position; }
|
|
|
|
|
2018-10-21 21:06:52 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setActiveWindow (FWidget* obj)
|
|
|
|
{ active_window = obj; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setFocusWidget (FWidget* obj)
|
|
|
|
{ focus_widget = obj; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setClickedWidget (FWidget* obj)
|
|
|
|
{ clicked_widget = obj; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setOpenMenu (FWidget* obj)
|
|
|
|
{ open_menu = obj; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setMoveSizeWidget (FWidget* obj)
|
|
|
|
{ move_size_widget = obj; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setStatusbarMessage (const FString& msg)
|
|
|
|
{ statusbar_message = msg; }
|
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::setVisible()
|
2019-01-09 20:05:29 +01:00
|
|
|
{ return setVisible(true); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::unsetVisible()
|
|
|
|
{ return setVisible(false); }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::setEnable()
|
|
|
|
{ return setEnable(true); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::unsetEnable()
|
|
|
|
{ return setEnable(false); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::setDisable()
|
|
|
|
{ return setEnable(false); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-12-22 23:50:10 +01:00
|
|
|
inline bool FWidget::setVisibleCursor (bool enable)
|
2018-11-05 23:19:03 +01:00
|
|
|
{
|
2018-12-22 23:50:10 +01:00
|
|
|
flags.visible_cursor = ( enable ) ? true : (( hideable ) ? false : true);
|
2018-11-05 23:19:03 +01:00
|
|
|
return flags.visible_cursor;
|
|
|
|
}
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::setVisibleCursor()
|
|
|
|
{ return setVisibleCursor(true); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::unsetVisibleCursor()
|
|
|
|
{ return setVisibleCursor(false); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::setFocus()
|
|
|
|
{ return setFocus(true); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::unsetFocus()
|
|
|
|
{ return setFocus(false); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setFocusable()
|
2018-11-05 23:19:03 +01:00
|
|
|
{ flags.focusable = true; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::unsetFocusable()
|
2018-11-05 23:19:03 +01:00
|
|
|
{ flags.focusable = false; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-12-22 23:50:10 +01:00
|
|
|
inline bool FWidget::ignorePadding (bool enable)
|
|
|
|
{ return (ignore_padding = enable); }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::ignorePadding()
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return (ignore_padding = true); }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::acceptPadding()
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return (ignore_padding = false); }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-11-07 22:06:58 +01:00
|
|
|
inline void FWidget::setForegroundColor (FColor color)
|
2016-11-02 00:37:58 +01:00
|
|
|
{
|
|
|
|
// valid colors -1..254
|
|
|
|
if ( color == fc::Default || color >> 8 == 0 )
|
|
|
|
foreground_color = color;
|
|
|
|
}
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-11-07 22:06:58 +01:00
|
|
|
inline void FWidget::setBackgroundColor (FColor color)
|
2016-11-02 00:37:58 +01:00
|
|
|
{
|
|
|
|
// valid colors -1..254
|
|
|
|
if ( color == fc::Default || color >> 8 == 0 )
|
|
|
|
background_color = color;
|
|
|
|
}
|
|
|
|
|
2019-10-06 22:35:00 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-10-08 04:37:19 +02:00
|
|
|
inline FWidget::FWidgetFlags& FWidget::setFlags()
|
2019-12-23 03:53:32 +01:00
|
|
|
{
|
|
|
|
// Gives direct access to the widget flags
|
|
|
|
return flags;
|
|
|
|
}
|
2019-10-06 22:35:00 +02:00
|
|
|
|
2015-10-17 19:40:43 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::setGeometry (const FRect& box, bool adjust)
|
|
|
|
{
|
2019-01-21 03:42:18 +01:00
|
|
|
setGeometry (box.getPos(), box.getSize(), adjust);
|
2015-10-17 19:40:43 +02:00
|
|
|
}
|
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-01-21 03:42:18 +01:00
|
|
|
inline void FWidget::setShadowSize (const FSize& size)
|
2019-01-16 16:00:15 +01:00
|
|
|
{
|
2019-01-21 03:42:18 +01:00
|
|
|
// width = right shadow / height = bottom shadow
|
|
|
|
wshadow.setSize (size);
|
2019-01-16 16:00:15 +01:00
|
|
|
}
|
|
|
|
|
2017-02-20 00:00:53 +01:00
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline void FWidget::setMinimumWidth (std::size_t min_width)
|
2019-01-21 03:42:18 +01:00
|
|
|
{ size_hints.setMinimum (FSize(min_width, size_hints.min_height)); }
|
2017-02-20 00:00:53 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline void FWidget::setMinimumHeight (std::size_t min_height)
|
2019-01-21 03:42:18 +01:00
|
|
|
{ size_hints.setMinimum (FSize(size_hints.min_width, min_height)); }
|
2017-02-20 00:00:53 +01:00
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-01-21 03:42:18 +01:00
|
|
|
inline void FWidget::setMinimumSize (const FSize& size)
|
2019-12-23 03:53:32 +01:00
|
|
|
{
|
|
|
|
// Sets the lower size limit to which the widget can be resized
|
|
|
|
size_hints.setMinimum (size);
|
|
|
|
}
|
2016-09-25 23:53:48 +02:00
|
|
|
|
2017-02-20 00:00:53 +01:00
|
|
|
//----------------------------------------------------------------------
|
2018-10-14 06:25:33 +02:00
|
|
|
inline void FWidget::setMaximumWidth (std::size_t max_width)
|
2019-01-21 03:42:18 +01:00
|
|
|
{ size_hints.setMaximum (FSize(max_width, size_hints.max_height)); }
|
2017-02-20 00:00:53 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2019-12-20 19:36:18 +01:00
|
|
|
inline void FWidget::setMaximumHeight (std::size_t max_height)
|
|
|
|
{ size_hints.setMaximum (FSize(size_hints.max_width, max_height)); }
|
2017-02-20 00:00:53 +01:00
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-12-20 19:36:18 +01:00
|
|
|
inline void FWidget::setMaximumSize (const FSize& size)
|
2019-12-23 03:53:32 +01:00
|
|
|
{
|
|
|
|
// Sets the upper size limit to which the widget can be resized
|
|
|
|
size_hints.setMaximum (size);
|
|
|
|
}
|
2016-09-25 23:53:48 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2019-01-21 03:42:18 +01:00
|
|
|
inline void FWidget::setFixedSize (const FSize& size)
|
2016-09-25 23:53:48 +02:00
|
|
|
{
|
2019-12-23 03:53:32 +01:00
|
|
|
// Sets the minimum and maximum size limit to fixed sizes to prevent
|
|
|
|
// the widget resizing
|
2019-01-21 03:42:18 +01:00
|
|
|
size_hints.setMinimum (size);
|
|
|
|
size_hints.setMaximum (size);
|
2016-09-25 23:53:48 +02:00
|
|
|
}
|
|
|
|
|
2015-10-17 19:40:43 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::unsetCursorPos()
|
2019-01-21 03:42:18 +01:00
|
|
|
{ setCursorPos (FPoint(-1, -1)); }
|
2016-10-08 02:54:32 +02:00
|
|
|
|
2015-06-21 23:27:10 +02:00
|
|
|
//----------------------------------------------------------------------
|
2016-11-02 00:37:58 +01:00
|
|
|
inline void FWidget::unsetDoubleFlatLine (fc::sides side)
|
2015-06-21 23:27:10 +02:00
|
|
|
{ setDoubleFlatLine(side, false); }
|
|
|
|
|
2016-09-03 15:17:48 +02:00
|
|
|
//----------------------------------------------------------------------
|
2016-11-02 00:37:58 +01:00
|
|
|
inline void FWidget::unsetDoubleFlatLine (fc::sides side, int pos)
|
2016-09-03 15:17:48 +02:00
|
|
|
{ setDoubleFlatLine(side, pos, false); }
|
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isRootWidget() const
|
|
|
|
{ return (! hasParent()); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isVisible() const
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return flags.visible; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isShown() const
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return flags.shown; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
2019-12-16 11:14:24 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isHidden() const
|
|
|
|
{ return flags.hidden; }
|
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isWindowWidget() const
|
2018-11-04 23:00:06 +01:00
|
|
|
{ return flags.window_widget; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isDialogWidget() const
|
2018-11-04 23:00:06 +01:00
|
|
|
{ return flags.dialog_widget; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isMenuWidget() const
|
2018-11-04 23:00:06 +01:00
|
|
|
{ return flags.menu_widget; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isEnabled() const
|
2018-11-04 23:00:06 +01:00
|
|
|
{ return flags.active; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::hasVisibleCursor() const
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return flags.visible_cursor; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::hasFocus() const
|
2018-11-04 23:00:06 +01:00
|
|
|
{ return flags.focus; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::acceptFocus() const // is focusable
|
2018-11-05 23:19:03 +01:00
|
|
|
{ return flags.focusable; }
|
2016-11-02 00:37:58 +01:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline bool FWidget::isPaddingIgnored()
|
|
|
|
{ return ignore_padding; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::clearStatusbarMessage()
|
|
|
|
{ statusbar_message.clear(); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2018-11-21 20:07:08 +01:00
|
|
|
inline void FWidget::addAccelerator (FKey key)
|
2016-11-02 00:37:58 +01:00
|
|
|
{ addAccelerator (key, this); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::delAccelerator()
|
|
|
|
{ delAccelerator(this); }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FPoint FWidget::termToWidgetPos (const FPoint& tPos)
|
|
|
|
{
|
2019-09-09 19:13:38 +02:00
|
|
|
return FPoint ( tPos.getX() + 1 - woffset.getX1() - adjust_wsize.getX()
|
|
|
|
, tPos.getY() + 1 - woffset.getY1() - adjust_wsize.getY() );
|
2016-11-02 00:37:58 +01:00
|
|
|
}
|
|
|
|
|
2019-01-27 13:44:13 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::print (const FPoint& pos)
|
|
|
|
{
|
|
|
|
setPrintPos (pos);
|
|
|
|
}
|
|
|
|
|
2016-09-25 23:53:48 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::drawBorder()
|
2019-08-11 18:15:57 +02:00
|
|
|
{
|
|
|
|
finalcut::drawBorder (this, FRect(FPoint(1, 1), getSize()));
|
|
|
|
}
|
2016-09-25 23:53:48 +02:00
|
|
|
|
2019-09-01 23:29:27 +02:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline const FWidgetColors& FWidget::getFWidgetColors() const
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return wcolors; }
|
2019-09-01 23:29:27 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline uInt FWidget::getModalDialogCounter()
|
|
|
|
{ return modal_dialog_counter; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2019-10-06 22:35:00 +02:00
|
|
|
inline FWidget::FWidgetList*& FWidget::getDialogList()
|
2019-09-01 23:29:27 +02:00
|
|
|
{ return dialog_list; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2019-10-06 22:35:00 +02:00
|
|
|
inline FWidget::FWidgetList*& FWidget::getAlwaysOnTopList()
|
2019-09-01 23:29:27 +02:00
|
|
|
{ return always_on_top_list; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
2019-10-06 22:35:00 +02:00
|
|
|
inline FWidget::FWidgetList*& FWidget::getWidgetCloseList()
|
2019-09-01 23:29:27 +02:00
|
|
|
{ return close_widget; }
|
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline FWidgetColors& FWidget::setFWidgetColors()
|
2019-09-09 19:13:38 +02:00
|
|
|
{ return wcolors; }
|
2019-09-01 23:29:27 +02:00
|
|
|
|
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline uInt& FWidget::setModalDialogCounter()
|
|
|
|
{ return modal_dialog_counter; }
|
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
//----------------------------------------------------------------------
|
|
|
|
inline void FWidget::processDestroy()
|
|
|
|
{ emitCallback("destroy"); }
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
|
2016-11-02 00:37:58 +01:00
|
|
|
// Non-member elements for NewFont
|
2015-05-23 13:35:12 +02:00
|
|
|
//----------------------------------------------------------------------
|
2019-11-03 23:34:47 +01:00
|
|
|
const wchar_t NF_menu_button[4] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_menu_button1,
|
|
|
|
fc::NF_rev_menu_button2,
|
|
|
|
fc::NF_rev_menu_button3,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_up[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_up_pointing_triangle1,
|
|
|
|
fc::NF_rev_up_pointing_triangle2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_down[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_down_pointing_triangle1,
|
|
|
|
fc::NF_rev_down_pointing_triangle2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_arrow_up[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_up_arrow1,
|
|
|
|
fc::NF_rev_up_arrow2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_arrow_down[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_down_arrow1,
|
|
|
|
fc::NF_rev_down_arrow2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_arrow_left[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_left_arrow1,
|
|
|
|
fc::NF_rev_left_arrow2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
|
|
|
const wchar_t NF_button_arrow_right[3] =
|
|
|
|
{
|
|
|
|
fc::NF_rev_right_arrow1,
|
|
|
|
fc::NF_rev_right_arrow2,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t NF_Drive[5] =
|
|
|
|
{
|
|
|
|
fc::NF_shadow_box_left,
|
|
|
|
fc::NF_shadow_box_middle,
|
|
|
|
fc::NF_shadow_box_hdd,
|
|
|
|
fc::NF_shadow_box_right,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t NF_CD_ROM[5] =
|
|
|
|
{
|
|
|
|
fc::NF_shadow_box_left,
|
|
|
|
fc::NF_shadow_box_middle,
|
|
|
|
fc::NF_shadow_box_cd,
|
|
|
|
fc::NF_shadow_box_right,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t NF_Net_Drive[5] =
|
|
|
|
{
|
|
|
|
fc::NF_shadow_box_left,
|
|
|
|
fc::NF_shadow_box_middle,
|
|
|
|
fc::NF_shadow_box_net,
|
|
|
|
fc::NF_shadow_box_right,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t CHECKBOX[4] =
|
|
|
|
{
|
|
|
|
fc::NF_shadow_box_left,
|
|
|
|
fc::NF_shadow_box_middle,
|
|
|
|
fc::NF_shadow_box_right,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t CHECKBOX_ON[4] =
|
|
|
|
{
|
|
|
|
fc::NF_shadow_box_left,
|
|
|
|
fc::NF_shadow_box_checked,
|
|
|
|
fc::NF_shadow_box_right,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t RADIO_BUTTON[4] =
|
|
|
|
{
|
|
|
|
fc::NF_radio_button1,
|
|
|
|
fc::NF_radio_button2,
|
|
|
|
fc::NF_radio_button3,
|
|
|
|
'\0'
|
|
|
|
};
|
2016-10-02 21:26:25 +02:00
|
|
|
|
2015-05-23 13:35:12 +02:00
|
|
|
const wchar_t CHECKED_RADIO_BUTTON[4] =
|
|
|
|
{
|
|
|
|
fc::NF_radio_button1,
|
|
|
|
fc::NF_radio_button2_checked,
|
|
|
|
fc::NF_radio_button3,
|
|
|
|
'\0'
|
|
|
|
};
|
|
|
|
|
2018-09-20 23:59:01 +02:00
|
|
|
} // namespace finalcut
|
|
|
|
|
2017-04-09 20:08:53 +02:00
|
|
|
#endif // FWIDGET_H
|