Clapkit
Loading...
Searching...
No Matches
Types

Cross-platform data types used by the framework. More...

Classes

struct  CKColor
 Defines an RGB color. A (Alpha) is usually not used in our case. More...
 
struct  CKPoint
 Defines a point on the screen. More...
 
struct  CKSize
 Defines a rectangular area. More...
 
struct  CKRect
 Defines a rectangular area at a specific location. More...
 
struct  CKEvent
 Defines an event raised by the framework, mostly for user actions. More...
 
struct  CKWindowInitParams
 Initialization parameters for a CKWindow. More...
 

Macros

#define CKPass   1
 Functions that return CKError return CKPass on success.
 

Typedefs

using CKEventHandlerFunc = std::function< void(const CKEvent &)>
 
using CKPropertyObserverFunc = std::function< void(const CKObject *, const char *)>
 
typedef int32_t CKError
 Return type for functions that might return an error. Also see: CKPass and CKErrorCode.
 

Enumerations

enum  CKErrorCode : CKError {
  CKError_OutOfMemory = 1000 , CKError_InvalidParameters , CKError_UserCancelled , CKError_NotFound ,
  CKError_AlreadyOpen , CKError_DriverNotAvailable , CKError_DriverActionFailed , CKError_TCPConnectionFailed ,
  CKError_TCPNotConnected , CKError_TCPUnreachable
}
 CK-Framework Specific Error Codes. More...
 
enum class  CKControlType {
  CKControlType::Unknown = 0 , CKControlType::PushButton , CKControlType::Label , CKControlType::Checkbox ,
  CKControlType::RadioButton , CKControlType::Canvas , CKControlType::TextField , CKControlType::Dropdown
}
 Defines a control type (i.e. PushButton, Checkbox, etc.) More...
 
enum class  CKMouseButton { CKMouseButton::None = 0 , CKMouseButton::Left = 1 , CKMouseButton::Middle = 2 , CKMouseButton::Right = 3 }
 Abstraction for mouse buttons. More...
 
enum class  CKTextJustification { CKTextJustification::Left = 0 , CKTextJustification::Center = 1 , CKTextJustification::Right = 2 }
 Used for text labels, etc. More...
 
enum class  CKEventType {
  CKEventType::nullEvent = 0 , CKEventType::click , CKEventType::doubleClick , CKEventType::mouseDown ,
  CKEventType::mouseMove , CKEventType::mouseUp , CKEventType::keyDown , CKEventType::keyUp ,
  CKEventType::moved , CKEventType::resized , CKEventType::deleted , CKEventType::removed ,
  CKEventType::changed , CKEventType::tcpConnectionFailed , CKEventType::tcpDisconnected , CKEventType::tcpConnected ,
  CKEventType::tcpReceivedData , CKEventType::tcpBufferFull , CKEventType::dataUndo , CKEventType::dataCut ,
  CKEventType::dataCopy , CKEventType::dataPaste , CKEventType::dataClear
}
 Defines an event type for controls (and windows.) More...
 
enum class  CKSystemIcon { CKSystemIcon::noIcon = 0 , CKSystemIcon::message = 1 , CKSystemIcon::warning = 2 , CKSystemIcon::error = 3 }
 Defines a system icon type. More...
 
enum class  CKScrollType { CKScrollType::none = 0 , CKScrollType::vertical = 1 , CKScrollType::horizontal = 2 , CKScrollType::both = 3 }
 Defines a scroll type. More...
 
enum class  CKWindowType { CKWindowType::Standard = 0 , CKWindowType::StandardResizable = 1 , CKWindowType::Modal = 2 , CKWindowType::Floating = 3 }
 Defines the type of the window. More...
 

Detailed Description

Cross-platform data types used by the framework.

Macro Definition Documentation

◆ CKPass

#define CKPass   1

Functions that return CKError return CKPass on success.

Typedef Documentation

◆ CKError

typedef int32_t CKError

Return type for functions that might return an error. Also see: CKPass and CKErrorCode.

◆ CKEventHandlerFunc

using CKEventHandlerFunc = std::function<void(const CKEvent&)>

◆ CKPropertyObserverFunc

using CKPropertyObserverFunc = std::function<void(const CKObject*, const char*)>

Enumeration Type Documentation

◆ CKControlType

enum class CKControlType
strong

Defines a control type (i.e. PushButton, Checkbox, etc.)

Enumerator
Unknown 
PushButton 
Label 
Checkbox 
RadioButton 
Canvas 
TextField 
Dropdown 

◆ CKErrorCode

CK-Framework Specific Error Codes.

Note
Note that all CK error codes are > 1. If an error code is negative, it's coming directly from the OS. (We negate if the number is positive, even if it might create conflicts.)
Enumerator
CKError_OutOfMemory 

Ran out of memory before completion.

CKError_InvalidParameters 

One or more parameters supplied are not correct. Check logs.

CKError_UserCancelled 

User pressed CMD + [.] to stop the operation.

CKError_NotFound 

File/URL/Control/Command specified could not be found.

CKError_AlreadyOpen 

File/URL/Control/Command specified is already open and can't be re-opened.

CKError_DriverNotAvailable 

Requested driver is not installed/available.

CKError_DriverActionFailed 

Requested driver failed to complete task.

CKError_TCPConnectionFailed 
CKError_TCPNotConnected 
CKError_TCPUnreachable 

◆ CKEventType

enum class CKEventType
strong

Defines an event type for controls (and windows.)

Enumerator
nullEvent 

Nothing.

click 

User clicked on window/control.

doubleClick 

User double-clicked on window/control.

mouseDown 

Mouse button pressed down on window or control.

mouseMove 

Mouse is being dragged while clicking.

mouseUp 

Mouse button released.

keyDown 

Keyboard key pressed.

keyUp 

Keyboard key released.

moved 

(Window-only) Window has moved.

resized 

(Window-only) Window has been resized.

deleted 

Window or control has been deleted/released.

removed 

Window has been closed or control removed from window.

changed 

For textfields, etc where value can be changed.

tcpConnectionFailed 

TCP socket was unable to connect to the specified address.

tcpDisconnected 

TCP socket has disconnected.

Note: This does NOT get called if you close the socket yourself. This is only for "unexpected" disconnections.

tcpConnected 

TCP socket has connected.

tcpReceivedData 

TCP socket has data to read.

tcpBufferFull 

TCP socket's incoming data buffer became full and you've missed incoming data - and will be missing data until you read the buffer.

dataUndo 

User wants to perform an undo (Cmd + Z) If no such event handler is installed, Clapkit will try to perform the task itself if it's a known type. If you install an event handler, you'll have to do it yourself. You have to install an event handler for non-standard data types. Additionally, you can overwrite 'PerformUndo' of your object.

dataCut 

User wants to perform a cut (Cmd + X) If no such event handler is installed, Clapkit will try to perform the task itself if it's a known type. If you install an event handler, you'll have to do it yourself. You have to install an event handler for non-standard data types. Additionally, you can overwrite 'PerformCut' of your object.

dataCopy 

User wants to perform a copy (Cmd + C) If no such event handler is installed, Clapkit will try to perform the task itself if it's a known type. If you install an event handler, you'll have to do it yourself. You have to install an event handler for non-standard data types. Additionally, you can overwrite 'PerformCopy' of your object.

dataPaste 

User wants to perform a paste (Cmd + V) If no such event handler is installed, Clapkit will try to perform the task itself if it's a known type. If you install an event handler, you'll have to do it yourself. You have to install an event handler for non-standard data types. Additionally, you can overwrite 'PerformPaste' of your object.

dataClear 

User wants to perform a 'clear' - i.e. delete all data on an user-editable control. If no such event handler is installed, Clapkit will try to perform the task itself if it's a known type. If you install an event handler, you'll have to do it yourself. You have to install an event handler for non-standard data types. Additionally, you can overwrite 'PerformClear' of your object.

◆ CKMouseButton

enum class CKMouseButton
strong

Abstraction for mouse buttons.

Enumerator
None 
Left 
Middle 
Right 

◆ CKScrollType

enum class CKScrollType
strong

Defines a scroll type.

Enumerator
none 
vertical 
horizontal 
both 

◆ CKSystemIcon

enum class CKSystemIcon
strong

Defines a system icon type.

Enumerator
noIcon 
message 
warning 
error 

◆ CKTextJustification

enum class CKTextJustification
strong

Used for text labels, etc.

Enumerator
Left 
Center 
Right 

◆ CKWindowType

enum class CKWindowType
strong

Defines the type of the window.

Enumerator
Standard 
StandardResizable 
Modal 
Floating