Creating a graphic library from scratch - page 10

 
Aliaksandr Hryshyn:

In my case, the "jungle" is no more complicated than the average: a display window (the visible area of the table), a full-size window in which all cells must fit, it will slide inside the main window, windows for rows and in them cells, plus scrolling (a slider bounded by a bar). The constraints on relative positioning are determined by the properties. Only for the slider it is necessary to intercept object movement events and already correct the position ofthe "full size window". This is all done by virtual windows, we need to bolt visual part to it, without visual part there will be windows for lines and full size window. And for an editable cell, make an input field (this is a custom one), all the other stuff will be handled by the engine - it will get right events for each cell (mouse events, redrawing, moving)..... These are possibilities, but there are also a couple of ideas to increase performance in case there are too many windows (large lists, tables, a few thousand windows).

You do it..... and we'll talk. :)))

If you will notice, this thread evolved from my crowdsourced gui thread where I demonstrated a markup language and visi editor. Some forum members thought they could replicate everything better and prettier in their library. The topic subsided after 4 pages. And it is still there. And here you are, like them, talking about "a thousand windows"... in short, do it finally.)))))

Good luck. ))))
 
I will describe tables a little bit:

1. A cell is the simplest element of a table and consists of three objects: a label, text and an icon.

2. There are several types of cells: column headers, row headers, and those inside. It is important to separate them, because header cells carry information about rows/columns (essentially their properties). This makes it easier to work with the table.

3. Every ordinary cell has a parameter whose value it outputs, but there are just text cells, without a parameter. This is a different type.

3. The properties of the cells should be configurable selectively: as for the whole row, for a column, or for the whole table.

4. The properties of header cells should be configured separately.

5. The table must "be able" to adapt other elements, such as: checkboxes, pop-up lists, ... even sliders, progress bars and radio buttons.

6. The table must be optimized to redraw only the cells with changed values, and not all of them.

7. The table should scroll if placed in a limited field of view.

8. The table can have part rollers.

9. The columns of the table can change their width.

10. The table can be dynamic, when the number of rows is not predetermined.

11. the table should be sortable.

12. the table should be able to be colored in its entirety, or by selected rows/columns.

God forbid to make a table on simple rectangles and texts, as such "cells" are not elements and this is a dead-end way.

I have these things implemented. Albeit not perfect in everything.... But they work and are fine.

A table is definitely one of the most complex elements. The most complex, involving many mechanisms and different solutions.
 
That's the table.))) I remember Anatoly was the first to do it on canvas. He had a hard time... Many things he implemented very nicely, one could have been jealous.
 
Реter Konow:
That's the table.))) I remember it was first done on canvas by Anatoly. He had a hard time... He implemented many things very nicely, one might have been jealous.

We don't make it look nice, we make it functional. Slowly I am making the right objects, and the approach is different from other solutions. Any objects can be placed in table cells. I have added to the engine support for kanvas, so it turns out that both kanvas and regular rectangles are used. A demo is attached.

Drag and drop can be done over upper left blank corner.


Files:
Test_v_grid.ex5  517 kb
 
Aliaksandr Hryshyn:

We don't make it look nice, we make it functional. Slowly I am making the right objects, and the approach is different from other solutions. Any objects can be placed in table cells. I have added to the engine support for kanvas, so it turns out that both kanvas and regular rectangles are used. A demo is attached.

Drag and drop can be done over upper left blank corner.


Not bad, not bad...

Criticism first:

Conceptually, is it one big window, or several small ones molded together? Unfortunately, there is no movability of the window(s). The mechanics work a little weird, there's more to think about. I have not found any way to put anything into the cells, they are not interactive. So far, there are no working controls, not even a simple button or checkbox. Structurally, windows are not elaborated - no frame, no minimize or zoom out button, no mean icon... Even without performing their functions, and for the sake of decorativeness, they're worth putting them in, because otherwise, it's unclear what we're looking at. Of course... very raw.

Praise:

Despite the shortcomings, I see a lot of progress and potential. Of course, if you have enough patience and strength, something might work out in the end. Well, the talent is undoubtedly there).


P.S. pleased with scrolling (albeit lame) and albeit limited, but "rubbery" window sill. :)))

P.S.S. Sorry, subwindows can be moved! Didn't figure it out at first. Of course, moving space is severely limited, but still...
 
Another plus: the "A" label (who knows why) is interactive! This is already a good thing.
 

Unfortunately, my windows are not positioned as they should be after loading:


Trying to put them in the centre is not successful.
 
Реter Konow:

Not bad, not bad...

Criticism first:

Conceptually, is it one big window, or several small ones molded together? Unfortunately, there is no mobility of the window(s). The mechanics work a little weird, there's more to think about. I have not found any way to put anything into the cells, they are not interactive. So far, there are no working controls, not even a simple button or checkbox. Structurally, windows are not elaborated - no frame, no minimize or zoom out button, no mean icon... Even without performing their functions, and for the sake of decorativeness, they're worth putting them in, because otherwise, it's unclear what we're looking at. Of course... very raw.

Praise:

Despite the shortcomings, I see a lot of progress and potential. Of course, if you have enough patience and strength, something might work out in the end. Well, the talent is undoubtedly there).


P.S. pleased with scrolling (albeit lame) and albeit limited, but "rubbery" window sill. :)))

P.S.S. Sorry, subwindows can be moved! Didn't figure it out at first. Of course, moving space is severely limited, but still...

Here all windows (general, cells, scrolling, slider for scrolling....) have the same principle of work, only different properties, differ only in visual representation, there are also invisible windows, therefore visualization of glass can be placed in any window, even in slider or red small square, there is no difference.

The glasses in the cells are interactive as in the indicator (movement of the glass itself over the tick chart and header, vertical price movement), only the events of scrolling the wheel are handled by the right scrolling of the table.

This table will serve as a basic visual element for creating different lists and tables, it doesn't matter what is placed inside the cell, you can have different objects or even the same table

 
Реter Konow:
Another plus : the "A" label (who knows why) is interactive! This is already a good thing.

Have you tested the tumblerindicator? This is an on/off switch for automatic price scrolling

 
Aliaksandr Hryshyn:

Have you tested the tumblerindicator? Is it an on/off switch for automatic price scrolling

Yes, the tumbler itself and the tick indicator are well made. They have the least amount of complaints. Did you write it yourself or borrow it from somewhere else?

Reason: