@@ -40,9 +40,17 @@ namespace GW {
4040 GWCA_API GW ::ButtonFrame* GetTabButton (GW ::UI ::Frame* tab_frame);
4141
4242 };
43+ // Sorting handler is actually a boolean function - return "1" if frame_id_1 needs to be bubbled higher than frame_id_2
44+ typedef int (__cdecl* SortHandler_pt)(uint32_t frame_id_1, uint32_t frame_id_2);
45+ struct ItemListFrame : UI ::Frame {
46+ // Returns false if the request failed, or nothing is selected
47+ GWCA_API bool GetSelectedValue (uint32_t * selected_value);
48+ GWCA_API bool SetSortHandler (SortHandler_pt sortHandler);
49+ GWCA_API SortHandler_pt GetSortHandler ();
50+ };
51+
4352 struct ScrollableFrame : UI ::Frame {
44- // Sorting handler is actually a boolean function - return "1" if frame_id_1 needs to be bubbled higher than frame_id_2
45- typedef int (__cdecl* SortHandler_pt)(uint32_t frame_id_1, uint32_t frame_id_2);
53+
4654 // Scrollable frame always has an "inner" page that handles the content. Only really need to mess with this if you're doing something odd.
4755 struct ScrollablePageContext {
4856 uint32_t flags;
@@ -59,18 +67,20 @@ namespace GW {
5967 GWCA_API bool RemoveItem (uint32_t child_offset_id);
6068 GWCA_API bool AddItem (uint32_t flags, uint32_t child_offset_id, GW ::UI ::UIInteractionCallback callback);
6169 GWCA_API uint32_t GetItemFrameId (uint32_t child_offset_id);
62- // Returns false if the request failed, or nothing is selected
6370 GWCA_API bool GetSelectedValue (uint32_t * selected_value);
71+
6472 // This is actually the child_frame_id of the last child in the list - things that use sorting, or the child id to identify the frame, will not represent the size.
6573 GWCA_API bool GetCount (uint32_t * size);
6674 GWCA_API uint32_t GetItems (uint32_t * child_frame_id_buffer = nullptr , uint32_t buffer_len = 0 );
6775
68- GWCA_API GW ::UI ::Frame * GetPage ();
76+ GWCA_API GW ::ItemListFrame * GetPage ();
6977 // Scrollable frame always has an "inner" page that handles the content. Only really need to mess with this if you're doing something odd.
70- GWCA_API GW ::UI ::Frame * SetPage (ScrollablePageContext*);
78+ GWCA_API GW ::ItemListFrame * SetPage (ScrollablePageContext*);
7179 };
7280
7381
82+
83+
7484 struct FrameWithValue {
7585 FrameWithValue () = default ;
7686 virtual ~FrameWithValue () = default ;
0 commit comments