37 typedef struct UiTableColumn { |
37 typedef struct UiTableColumn { |
38 winrt::Microsoft::UI::Xaml::Controls::Button header; |
38 winrt::Microsoft::UI::Xaml::Controls::Button header; |
39 |
39 |
40 } UiTableColumn; |
40 } UiTableColumn; |
41 |
41 |
|
42 struct UiWinuiTableDnd { |
|
43 UiTableDndEvent evtobj; |
|
44 int evttype = 0; |
|
45 winrt::Microsoft::UI::Xaml::DragStartingEventArgs dndstartargs = { nullptr }; |
|
46 winrt::Microsoft::UI::Xaml::DropCompletedEventArgs dndcompletedargs = { nullptr }; |
|
47 winrt::Microsoft::UI::Xaml::DragEventArgs drageventargs = { nullptr }; |
|
48 }; |
|
49 |
42 typedef struct UiTable { |
50 typedef struct UiTable { |
43 winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollw; |
51 winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollw; |
44 winrt::Microsoft::UI::Xaml::Controls::Grid grid; |
52 winrt::Microsoft::UI::Xaml::Controls::Grid grid; |
45 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush defaultBrush; |
53 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush defaultBrush; |
46 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush highlightBrush; |
54 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush highlightBrush; |
62 ui_getvaluefunc getvalue = nullptr; |
70 ui_getvaluefunc getvalue = nullptr; |
63 int maxrows = 0; |
71 int maxrows = 0; |
64 int lastSelection = 0; |
72 int lastSelection = 0; |
65 ULONG64 lastPointerPress = 0; |
73 ULONG64 lastPointerPress = 0; |
66 std::vector<int> selection; |
74 std::vector<int> selection; |
67 bool enabledrag = false; |
75 bool enabledrag = false; // TODO: remove |
68 bool enabledrop = false; |
76 bool enabledrop = false; // TODO: remove |
69 |
77 |
70 UiTable(UiObject *obj, winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid); |
78 UiTable(UiObject *obj, winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid); |
71 |
79 |
72 ~UiTable(); |
80 ~UiTable(); |
73 |
81 |
83 |
91 |
84 bool is_row_selected(int row); |
92 bool is_row_selected(int row); |
85 |
93 |
86 void remove_from_selection(int row); |
94 void remove_from_selection(int row); |
87 |
95 |
|
96 UiListSelection uiselection(); |
|
97 |
88 void call_handler(ui_callback cb, void *cbdata); |
98 void call_handler(ui_callback cb, void *cbdata); |
89 } UiTable; |
99 } UiTable; |
90 |
100 |
91 extern "C" void ui_table_update(UiList * list, int i); |
101 extern "C" void ui_table_update(UiList * list, int i); |
92 |
102 |