2019-03-31 22:07:10 +00:00
|
|
|
/*
|
|
|
|
* Mr. 4th Dimention - Allen Webster
|
|
|
|
*
|
|
|
|
* 31.03.2019
|
|
|
|
*
|
2019-04-01 00:36:09 +00:00
|
|
|
* Text layout representation
|
2019-03-31 22:07:10 +00:00
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FRED_TEXT_LAYOUT_H)
|
|
|
|
#define FRED_TEXT_LAYOUT_H
|
|
|
|
|
|
|
|
struct Text_Layout{
|
|
|
|
// NOTE(allen): This is not a _real_ text layout yet.
|
|
|
|
// The eventual destiny of this type is that it will store the fairly
|
|
|
|
// costly to generate results of the text layout engine.
|
|
|
|
// For now, since the engine cannot be easily consolidated,
|
|
|
|
// this just stores the parameters that should be handed to any
|
|
|
|
// system that attempts to query the layout for hit testing.
|
2019-08-01 02:13:36 +00:00
|
|
|
View_ID view_id;
|
2019-03-31 22:07:10 +00:00
|
|
|
Buffer_ID buffer_id;
|
2019-04-01 00:36:09 +00:00
|
|
|
Buffer_Point point;
|
2019-04-01 06:40:24 +00:00
|
|
|
Range on_screen_range;
|
|
|
|
f32 height;
|
2019-08-01 02:13:36 +00:00
|
|
|
|
|
|
|
Text_Layout_Coordinates coordinates;
|
2019-04-01 00:36:09 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
union Text_Layout_Node{
|
|
|
|
Text_Layout_Node *next;
|
|
|
|
Text_Layout layout;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Text_Layout_Container{
|
|
|
|
Arena node_arena;
|
|
|
|
Text_Layout_Node *free_nodes;
|
|
|
|
u32_Ptr_Table table;
|
|
|
|
u32 id_counter;
|
2019-03-31 22:07:10 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|