Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add node style setter #78

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Enjection
Copy link

No description provided.

if (fyn->style == FYNS_ALIAS)
return;

fyn->style = style;
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wish it was so simple.

The problem is that for scalars it is quite possible to set a style that is illegal.

For instance change a double quoted scalar node's style to plain is illegal if the scalar has \0 for example.

So for the setter to work it must run a check of what are the permissible styles, and allow the setting if permitted.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would like to make at least unchecked dangrous version like fy_node_set_style_unchecked, because currently we don't have public interface to change style at all. It is a problem for outputting some nodes in somehow beautified way

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants