Skip to content

Popup pages and advanced controls #227

@Pconti31

Description

@Pconti31

Recently I have been somewhat annoyed by the full page refresh that occurs when we use a popup page. I think that we could improve this if we added properties of frame size to the popup pages.
Normally, it would be the full page but if set to a smaller size with x and y coordinates you could use your refresh code to handle just the frame area. The builder could handle this for users.

The second thing is assigning popup page to keypad seems overkill and awkward. It's not a problem for the builder but still seems odd. Now I accept blame for this having come up with popup page and the keypad but given the rule about not using malloc that was the best I could think of at the time.

However, as I think about implementing something like a ComboBox it seems to me that a more general solution might be possible.

I'm thinking of a new component that i'll refer to as a popup block. Think box with mini page like qualities. It would only be for compound elements hand crafted like we do now but with a new data structure that is a smaller page struct with xdata for storing all the components in it. Much as we do now for compound elements. Users or the Builder would alloc this new struct instead of say, gslc_tsXKeyPad_Num. Everything else stays the same.
The page struct would add a pointer to the current, if any, mini page and the refresh rules would be:

  • popup block
  • current popup page (so we could place popup blocks on popup page?)
  • active page
  • base page

This I think this would make creating a new control like, ComboBox much easier since once a user touched a combobox we could paint the popup block with its options.

This would also cleanup the keypad creation. We could of course keep the current keypad for backward compat and simply add a frame to popup page to solve refreshes or create a new version using popup blocks so we don't need to create a page and assign it to the keypad.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions