43 winrt::Microsoft::UI::Xaml::Controls::Grid grid; |
44 winrt::Microsoft::UI::Xaml::Controls::Grid grid; |
44 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush defaultBrush; |
45 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush defaultBrush; |
45 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush highlightBrush; |
46 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush highlightBrush; |
46 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush selectedBrush; |
47 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush selectedBrush; |
47 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush selectedBorderBrush; |
48 winrt::Microsoft::UI::Xaml::Media::SolidColorBrush selectedBorderBrush; |
|
49 UiObject* obj; |
|
50 ui_callback onactivate; |
|
51 void* onactivatedata; |
|
52 ui_callback onselection; |
|
53 void* onselectiondata; |
48 UiModel* model = nullptr; |
54 UiModel* model = nullptr; |
49 std::vector<UiTableColumn> header; |
55 std::vector<UiTableColumn> header; |
50 ui_getvaluefunc getvalue = nullptr; |
56 ui_getvaluefunc getvalue = nullptr; |
51 int maxrows = 0; |
57 int maxrows = 0; |
52 int lastSelection = 0; |
58 int lastSelection = 0; |
|
59 ULONG64 lastPointerPress = 0; |
53 std::vector<int> selection; |
60 std::vector<int> selection; |
54 |
61 |
55 UiTable(winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid); |
62 UiTable(UiObject *obj, winrt::Microsoft::UI::Xaml::Controls::ScrollViewer scrollW, winrt::Microsoft::UI::Xaml::Controls::Grid grid); |
56 |
63 |
57 ~UiTable(); |
64 ~UiTable(); |
58 |
65 |
59 void add_header(UiModel* model); |
66 void add_header(UiModel* model); |
60 |
67 |
67 void change_rows_bg(std::vector<int> rows, winrt::Microsoft::UI::Xaml::Media::Brush brush, winrt::Microsoft::UI::Xaml::Media::Brush borderBrush); |
74 void change_rows_bg(std::vector<int> rows, winrt::Microsoft::UI::Xaml::Media::Brush brush, winrt::Microsoft::UI::Xaml::Media::Brush borderBrush); |
68 |
75 |
69 bool is_row_selected(int row); |
76 bool is_row_selected(int row); |
70 |
77 |
71 void remove_from_selection(int row); |
78 void remove_from_selection(int row); |
|
79 |
|
80 void call_handler(ui_callback cb, void *cbdata); |
72 } UiTable; |
81 } UiTable; |
73 |
82 |
74 extern "C" void ui_table_update(UiList * list, int i); |
83 extern "C" void ui_table_update(UiList * list, int i); |
75 |
84 |