MarkupBox

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

MarkupBox

#1 Post by adrian_broher »

While plowing through the UI code I realized that the MarkupBox class isn't used. The MarkupBox is some RichText widget utilizing some HTML-ish document language to embed hyperlinks and images into text. I would assume this should be used for the Pedia. Aside from some API changes between 2010 to 2014 tzlain seems to be only one seriously working on this.

Do we still have plans for it? Can it be removed? Should it be fixed?
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13587
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: MarkupBox

#2 Post by Geoff the Medio »

adrian_broher wrote:The MarkupBox is some RichText widget utilizing some HTML-ish document language to embed hyperlinks and images into text. I would assume this should be used for the Pedia.
That was the idea... Ideally, it would allow getting rid of the custom top bar of the pedia, to instead have text and graphics laid out with basic HTML-like markup of text.
Aside from some API changes between 2010 to 2014 tzlain seems to be only one seriously working on this.
tzlaine never worked on it as far as I remember... Just me.
Do we still have plans for it? Can it be removed? Should it be fixed?
I'd still like to have the functionality, but there were limits to how GG's text formatting worked that made it difficult to use for implementing the MarkupBox functionality I wanted, so I abandoned it. I think the issues mainly had to do with breaking text into smaller chunks so it could be put into adjacent rectangular Edit controls that combined to make the text to wrap/fit into non-rectangular regions, such as occurs for text near images in web page layout. Using the existing text layout code in GG for this wasn't working well.

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: MarkupBox

#3 Post by adrian_broher »

Geoff the Medio wrote:tzlaine never worked on it as far as I remember... Just me.
My bad, i didn't look properly at the log.

Well, then I keep it as it is for now.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
Cjkjvfnby
AI Contributor
Posts: 539
Joined: Tue Jun 24, 2014 9:55 pm

Re: MarkupBox

#4 Post by Cjkjvfnby »

adrian_broher wrote:
Geoff the Medio wrote:tzlaine never worked on it as far as I remember... Just me.
My bad, i didn't look properly at the log.

Well, then I keep it as it is for now.
You can add summary of this topic as comment to code to save someone else time.

IMHO Code what has no usages should no be present in main branch. In git workflow it lives in separate branch before it is ready. Such code may confuse other users, it may be not tested at all, it may need time to support due other code changes.
If I provided any code, scripts or other content here, it's released under GPL 2.0 and CC-BY-SA 3.0

Post Reply