File diff r8081:4b2e0b6ba8ce → r8082:9d654f9b59ea
src/window.h
Show inline comments
 
@@ -216,49 +216,49 @@ enum WindowDefaultFlag {
 

	
 
	WDF_UNCLICK_BUTTONS =   1 << 4, ///< Unclick buttons when the window event times out */
 
	WDF_STICKY_BUTTON   =   1 << 5, ///< Set window to sticky mode; they are not closed unless closed with 'X' (widget 2)
 
	WDF_RESIZABLE       =   1 << 6, ///< A window can be resized
 
	WDF_MODAL           =   1 << 7, ///< The window is a modal child of some other window, meaning the parent is 'inactive'
 
};
 

	
 
/* can be used as x or y coordinates to cause a specific placement */
 
enum WindowDefaultPosition {
 
	WDP_AUTO      = -1, ///< Find a place automatically
 
	WDP_CENTER    = -2, ///< Center the window (left/right or top/bottom)
 
	WDP_ALIGN_TBR = -3, ///< Align the right side of the window with the right side of the main toolbar
 
	WDP_ALIGN_TBL = -4, ///< Align the left side of the window with the left side of the main toolbar
 
};
 

	
 
struct Textbuf {
 
	char *buf;                  ///< buffer in which text is saved
 
	uint16 maxlength, maxwidth; ///< the maximum size of the buffer. Maxwidth specifies screensize in pixels, maxlength is in bytes
 
	uint16 length, width;       ///< the current size of the string. Width specifies screensize in pixels, length is in bytes
 
	bool caret;                 ///< is the caret ("_") visible or not
 
	uint16 caretpos;            ///< the current position of the caret in the buffer, in bytes
 
	uint16 caretxoffs;          ///< the current position of the caret in pixels
 
};
 

	
 
#define WP(ptr,str) (*(str*)(ptr)->custom)
 
#define WP(ptr, str) (*(str*)(ptr)->custom)
 
/* You cannot 100% reliably calculate the biggest custom struct as
 
 * the number of pointers in it and alignment will have a huge impact.
 
 * 96 is the largest window-size for 64-bit machines currently */
 
#define WINDOW_CUSTOM_SIZE 96
 

	
 
struct Scrollbar {
 
	uint16 count, cap, pos;
 
};
 

	
 
struct ResizeInfo {
 
	uint width; ///< Minimum width and height
 
	uint height;
 
	uint step_width; ///< In how big steps the width and height go
 
	uint step_height;
 
};
 

	
 
struct WindowMessage {
 
	int msg;
 
	int wparam;
 
	int lparam;
 
};
 

	
 
struct Window {
 
	uint16 flags4;