Add wxListCtrl support to document and DC classes - #136
Conversation
Important if translated or font is different
This is a nice feature making it a lot easier to output tables to PDF. Currently, your implementation uses
That is the reason why the Appveyor CI run currently fails. I will adjust the build scripts after I have merged the PR. |
|
OK, |
|
I regenerated the build files to include the new class and the listctrl sample. However, I detected a glitch in the implementation. For cells with a background color the list icons were not visible in PDF (although they are actually in the PDF file). The reason is the order in which icons and cell content were drawn. The icon was written to PDF before the cell content. Therefore the cell content was drawn over the icon, making the icon invisible, if the cell had a background fill color. I committed a fix for this. There are still other issues with the implementation. For example, the cell alignment is not respected. All cells are written left aligned to PDF. Additionally, there will be problems if an application will draw more than one listctrl with different image lists attached. The names of the icons use the index within the image list, and therefore the second listctrl will actually use the icons from the first list, because the names will be identical. It will be necessary to use either a global index, so that each icon gets a unique name (could be inefficient, if the icon list really are identical). Or some logic would be needed to detect which icons are really different. |
|
OK, I just submitted a PR to fix these. |
Thanks. I merged your PR. |
These classes can now accept a
wxListCtrl(with various options) and they will print it within the document (spanning across multiple pages if necessary).I tried to emulate some of LaTeX table features so that we have lots of customization available.
Sample project is included, but only the CMake project builds it currently; you will need to run the premake script to add it to the other build scripts.
Some examples from the sample project: