Splitter window¶
These interfaces are used to implement panels that can host other panels.
Splitter¶
-
class splitter_window : public uie::window¶
Subclass of uie::window, specifically for splitters.
Splitter classes must support multiple instances
Subclassed by uie::splitter_window_v2
Public Functions
-
inline virtual bool get_config_item_supported(t_size p_index, const GUID &p_type) const¶
Get config item supported.
- Returns:
count
-
inline virtual bool get_config_item(t_size index, const GUID &p_type, stream_writer *p_out, abort_callback &p_abort) const¶
Creates non-modal child configuration dialog. Since its non-modal, remember to keep a refcounted reference to yourself. Use WS_EX_CONTROLPARENT.
-
inline bool get_config_item(t_size index, const GUID &p_type, stream_writer *p_out) const¶
-
inline virtual bool set_config_item(t_size index, const GUID &p_type, stream_reader *p_source, abort_callback &p_abort)¶
-
template<typename class_t>
inline bool set_config_item_t(t_size index, const GUID &p_type, const class_t &p_val, abort_callback &p_abort)¶
-
template<class T>
inline bool get_config_item(t_size p_index, const GUID &p_type, T &p_out, abort_callback &p_abort) const¶
-
virtual void insert_panel(t_size index, const splitter_item_t *p_item) = 0¶
This method may be called on both active and inactive (i.e. no window) instances
-
virtual void remove_panel(t_size index) = 0¶
This method may be called on both active and inactive (i.e. no window) instances
-
virtual void replace_panel(t_size index, const splitter_item_t *p_item) = 0¶
This method may be called on both active and inactive (i.e. no window) instances
-
virtual t_size get_panel_count() const = 0¶
-
inline virtual t_size get_maximum_panel_count() const¶
-
inline virtual void register_callback(class splitter_callback *p_callback)¶
Reserved for future use
-
inline virtual void deregister_callback(class splitter_callback *p_callback)¶
Reserved for future use
-
inline void get_panel(t_size index, pfc::ptrholder_t<splitter_item_t> &p_out) const¶
-
inline t_size add_panel(const splitter_item_t *p_item)¶
-
inline void swap_items(t_size p_item1, t_size p_item2)¶
-
inline bool move_up(t_size p_index)¶
-
inline bool move_down(t_size p_index)¶
-
inline bool set_config_item(t_size index, const GUID &p_type, const void *p_data, t_size p_size, abort_callback &p_abort)¶
-
FB2K_MAKE_SERVICE_INTERFACE(splitter_window, window)¶
Public Static Attributes
-
static const GUID bool_show_caption = {0x4673437d, 0x1685, 0x433f, {0xa2, 0xcc, 0x38, 0x64, 0xd6, 0x9, 0xf4, 0xe2}}¶
-
static const GUID bool_autohide = {0x40c95dfe, 0xe5e9, 0x4f11, {0x90, 0xec, 0xe7, 0x41, 0xbe, 0x88, 0x7d, 0xdd}}¶
-
static const GUID bool_locked = {0x3661a5e9, 0xfb4, 0x4d2a, {0xac, 0x5, 0xef, 0x2f, 0x47, 0xd1, 0x8a, 0xd9}}¶
-
static const GUID uint32_orientation = {0x709465de, 0x42cd, 0x484d, {0xbe, 0x8f, 0xe7, 0x37, 0xf0, 0x1a, 0x64, 0x58}}¶
-
static const GUID bool_show_toggle_area = {0x5ce8945e, 0xbbb4, 0x4308, {0x99, 0xc1, 0xdf, 0xa6, 0xd1, 0xf, 0x90, 0x4}}¶
-
static const GUID uint32_size = {0x5cb327ab, 0x34eb, 0x409c, {0x9b, 0x4e, 0x10, 0xd0, 0xa3, 0xb0, 0x4e, 0x8d}}¶
-
static const GUID bool_use_custom_title = {0x71bc1fbc, 0xedd1, 0x429c, {0xb2, 0x62, 0x74, 0xc2, 0xf0, 0xa, 0xb3, 0xd3}}¶
-
static const GUID string_custom_title = {0x3b4deda5, 0x493d, 0x4c5c, {0xb5, 0x2c, 0x3, 0x6d, 0xe4, 0xcf, 0x43, 0xd9}}¶
-
static const GUID size_and_dpi = {0x443eea36, 0xe5f0, 0x4add, {0xba, 0xe, 0xf3, 0x17, 0x26, 0xb0, 0xbc, 0x45}}¶
-
inline virtual bool get_config_item_supported(t_size p_index, const GUID &p_type) const¶
-
class splitter_window_v2 : public uie::splitter_window¶
Extends uie::splitter_window, providing additional methods used for live editing.
New in SDK version 6.5.
Public Functions
-
inline virtual bool is_point_ours(HWND wnd_point, const POINT &pt_screen, pfc::list_base_t<uie::window::ptr> &p_hierarchy)¶
Checks if a point is within this splitter window. Used for live layout editing.
If the point is within your window (including any child windows), append yourself to p_hierarchy. If it is in a non-splitter child window, additionally append the child window to the list. If the child window is a splitter window, call its is_point_ours to complete the hierarchy.
- Parameters:
wnd_point – [in] The window the original mouse message was being sent to.
pt_screen – [in] The point being checked.
p_hierarchy – [out] Receives the hierarchy of windows leading to the point including this window.
- Returns:
True if the point is window the window; otherwise false.
-
inline virtual void get_supported_panels(const pfc::list_base_const_t<uie::window::ptr> &p_windows, bit_array_var &p_mask_unsupported)¶
Checks if windows can be inserted into this splitter. Used for live editing.
Implement this by calling uie::window::is_available on each window.
- Parameters:
p_windows – [in] List of windows to check.
p_mask_unsupported – [out] A bit array the same size as the number of windows in p_windows. Receives values indicating whether each window can be inserted. A set bit indicates the respective window cannot be inserted.
-
FB2K_MAKE_SERVICE_INTERFACE(splitter_window_v2, splitter_window)¶
-
inline virtual bool is_point_ours(HWND wnd_point, const POINT &pt_screen, pfc::list_base_t<uie::window::ptr> &p_hierarchy)¶
Splitter items¶
-
class splitter_item_t¶
Holds data about a splitter item.
Derive from here and also store your other stuff (show_caption..) Functions as data container only!
Subclassed by uie::splitter_item_full_t
Public Functions
-
virtual const GUID &get_panel_guid() const = 0¶
-
virtual void set_panel_guid(const GUID &p_guid) = 0¶
Setting GUID deletes panel config and window ptr (i.e. do it first)
-
virtual void get_panel_config(stream_writer *p_out) const = 0¶
-
virtual void set_panel_config(stream_reader *p_reader, t_size p_size) = 0¶
-
virtual const window_ptr &get_window_ptr() const = 0¶
-
inline virtual bool query(const GUID &p_guid) const¶
-
inline virtual ~splitter_item_t()¶
-
inline void get_panel_config_to_array(pfc::array_t<uint8_t> &p_data, bool reset = false, bool refresh = false) const¶
-
inline pfc::array_t<uint8_t> get_panel_config_to_array(bool refresh = false) const¶
-
inline void set_panel_config_from_ptr(const void *p_data, t_size p_size)¶
-
virtual const GUID &get_panel_guid() const = 0¶
-
template<class t_base>
class splitter_item_simple : public t_base¶ Implements splitter_item_t with the standard set of data stored.
Public Functions
-
inline virtual const GUID &get_panel_guid() const¶
-
inline virtual void get_panel_config(stream_writer *p_out) const¶
-
inline virtual void set_panel_guid(const GUID &p_guid)¶
-
inline virtual void set_panel_config(stream_reader *p_reader, t_size p_size)¶
-
inline virtual const window_ptr &get_window_ptr() const¶
-
inline void set_window_ptr(const window_ptr &p_source)¶
-
inline virtual const GUID &get_panel_guid() const¶
-
class splitter_item_full_t : public uie::splitter_item_t¶
Implements splitter_item_t with a full set of data stored.
Subclassed by uie::splitter_item_full_v2_t
Public Functions
-
virtual void get_title(pfc::string_base &p_out) const = 0¶
-
virtual void set_title(const char *p_title, t_size length) = 0¶
-
inline virtual bool query(const GUID &p_guid) const override¶
Public Members
-
uint32_t m_caption_orientation = {}¶
-
bool m_locked = {}¶
-
bool m_autohide = {}¶
-
bool m_show_caption = {}¶
-
uint32_t m_size = {}¶
-
bool m_show_toggle_area = {}¶
-
bool m_custom_title = {}¶
Public Static Functions
-
static inline const GUID &get_class_guid()¶
-
virtual void get_title(pfc::string_base &p_out) const = 0¶
-
class splitter_item_full_v2_t : public uie::splitter_item_full_t¶
Subclassed by uie::splitter_item_full_v3_t
Public Functions
-
inline virtual bool query(const GUID &p_guid) const override¶
Public Static Functions
-
static inline const GUID &get_class_guid()¶
-
inline virtual bool query(const GUID &p_guid) const override¶
-
class splitter_item_full_v3_t : public uie::splitter_item_full_v2_t¶
Splitter item implementing support for additional data.
Use this when your splitter window needs to store additional data for each child panel that’s not covered by the standard variables.
Note
You can use splitter_item_full_v3_impl_t rather than implementing this class. Alternatively, you can derive from splitter_item_full_v3_base_t.
Public Functions
-
virtual void get_extra_data(stream_writer *writer) const = 0¶
Gets the additional data associated with this splitter item.
Note
Check that get_extra_data_format_id() matches your format ID before calling this, as splitter items from other splitter windows may be inserted into your window.
Note
The data returned by this function may be serialised and passed between foobar2000 instances via the clipboard. And, at some point, you may find that you need to change the structure of the data. Make sure that your code handles such changes gracefully.
- Parameters:
writer – Stream that receives the additional data.
-
virtual GUID get_extra_data_format_id() const = 0¶
Gets a GUID to identify the format of the data returned by get_extra_data()
- Returns:
The format identifier
-
inline virtual bool query(const GUID &p_guid) const override¶
Public Static Functions
-
static inline const GUID &get_class_guid()¶
-
virtual void get_extra_data(stream_writer *writer) const = 0¶
-
class splitter_item_full_v3_impl_t : public uie::splitter_item_full_impl_base_t<splitter_item_full_v3_t>¶
Implements splitter_item_full_v3_t.