I have two .dox files. One contains the main page and another file
describing the lattice module. I am having a problem including lattice.dox
in the mainpage.
Here is vikingr.dox that containr the main page
/// \mainpage Vikingr
///
/// \section intro_sec Introduction
///
/// This is the introduction.
///
/// This manual is divided in the following sections:
/// - \subpage desc_lattice
And here is the lattice.dox
/// \subpage desc_lattice Lattice
///
/// \section sec_lattice Description
///
/// \subsection latiswp Wallpaper (Tiling) Lattices
///
/// Wallpaper lattices are two dimensional tilings classified
/// into five different families: \b square, \b rhombic,
/// \b rectangular, \b parallelogram, and \b hexagonal.
///
/// The following gives a short review of the wallpaper families.
Replace
/// \subpage desc_lattice Lattice
with
/// \page desc_lattice Lattice
The main' folder is saying the lattice doc is the sub-page; but the lattice doc is itself a page - it just happens to be subsidiary to the main page.
Related
I sometimes wonder what vscode's default widget color is. For example: when I use a github theme, I find that it only defines one part of the color internally, so where is the other part defined, and how do I view it.
For example, when I look at the color scheme of the topic by Developer : generator color theme... command, the undefined part is always shown in the form of comments(e.g "activityBar.activeBackground": null,). How can I see the color of this annotated section?
In the sizing documentation, it says "Easily make an element as wide or as tall (relative to its parent) with the width and height utilities.".
What I realize is that almost all the examples in system section of documentation, examples mostly related to Box component. I tried some of the tricks from there on Button element. And expectedly nothing changed.
Well for those who is new on material (actually UI) this is a bit tricky. first, they use Box because as per box documentation they said box generated using material styled (not the styled-components) "The Box component packages all the style functions that are exposed in #material-ui/system. It's created using the styled() function of #material-ui/core/styles."
So, I went to the github and material core repository to understand how to do that.
export const styleFunction = css(
compose(
borders,
display,
flexbox,
grid,
positions,
palette,
shadows,
sizing,
spacing,
typography,
),
);
css and compose are also exported from #material-ui/system
then at the end of the file;
const Box = styled(BoxRoot, { shouldForwardProp }, { muiName: 'MuiBox' })(styleFunction);
export default Box;
The styled used here is from an experimentalStyled package (an internal package) but that does not matter. Cuz, Material guys exporting a styled function/hook for our use.
import { styled } from "#material-ui/core/styles";
I tried this styled function for Button component.
const CustomButton = styled(Button)(sizing);
adn yes it worked. I am now able to apply magical styling skills defined in the system section of material UI.
For those who wants to use this instead of other methods. I pushed an npm package too.
material-ui-styled-hook
This collection has many items within many sections. I am trying to place a border around each section and further highlight it.
Trail 1:
Using headers and footers I can draw lines (header has top,left,right; footer has left,right,bottom) which look like frame ends. But I can't get them to highlight on item select.
(I don't want to make this too complex by listing my code. I think there are tutorials to create collection headers and footers. But in summary: I created a UICollectionReuseableView class for each, registered them and applied a referenceSize for each of them.)
Trial2:
I can highlight each item, in that section (using a color with alpha overlay), when any item is selected.
(Again in summary: I used a for loop within the didSelectItemAt method.)
If each section was always one row of items, then I could use the item height, but thats not always the case - especially if rotated.
How can I place a border around each section then highlight on item selection?
I am developing for the HoloLens and I Made an object that follows me around. This Gameobject is actually an UI Canvas with text in it which I set like this because i want to keep the original object as well. (Just like in the MS example):
/// <summary>
/// The object to tag along set in the unity editor
/// </summary>
public GameObject ObjectToTagAlong;
/// <summary>
/// The instantiated object to tag along that follows you around.
/// </summary>
private GameObject instantiatedObjectToTagAlong;
this.instantiatedObjectToTagAlong = GameObject.Instantiate(this.ObjectToTagAlong);
this instantiatedObject tags along just fine but now I want to update the Text on instantiatedObjectToTagAlong but have no idea how to do this. (I can very easily update the text on the 1st object but i want to do it this way)
Does anyone know how to update the text on a gameobject that is initiated from another GameObject?
To build on what Serlite commented with, you need to use GetComponent in combination with another script.
public class MyTextUpdater: MonoBehavior
{
public Text SuperText2;
}
Apply MyTextUpdater to your ObjectToTagAlong prefab (or GameObject if not a prefab) and, in the editor, set the value of SuperText2 to the Text object you want to update (typically this is a child of the ObjectToTagAlong GameObject).
Now anytime you want to update that Text object on your instance, instantiatedObjectToTagAlong, you can do this:
MyTextUpdater text = instantiatedObjectToTagAlong.GetComponent<MyTextUpdate>();
if (text!=NULL && text.SuperText2!=NULL) { /*do whatever you need to do on the text.SuperText2 object*/ }
EDIT:
When Unity instantiates a copy of a GameObject, it makes a "deep" copy of sorts, meaning that the copy will have the exact same structure of child GameObjects.
Original Copy
- Child A - Child A (copy)
- Child B Instanitate => - Child B (copy)
- - Grandchild A - - Grandchild A (copy)
Each child is instantiated with it's own new copy. On top of that, if Original has a MonoBehavior script that points to one of it's children (or grandchildren etc), Copy will have a script that points to the appropriately copied child.
MyTextUpdater [Original] MyTextUpdater [Copy]
- SuperText2 = Child B => - SuperText2 = Child B (copy)
Regarding the question of why have the extra script (the MyTextUpdater script):
Original is just a GameObject. In the editor you can see it has children, but that does not represent a class. You can not do something like this in a script:
Original.ChildB.Text = "Hello World!";
in the same way, you can't do this:
Copy.ChildB.Text = "Hello Copy World!";
You could create code to iterate through all the children of the GameObject looking for a child with the correct name ("ChildB"), but that is inefficient and probably bad programming.
The better way is to create a script class that actually does give you access to the child as a field in that class. And that is where the MyTextUpdater script comes in.
This would be invalid:
GameObject Copy = Instantiate(Original);
Copy.SuperText2.Text = "Some text here";
Copy does not have a field or method called SuperText2, or ChildB, or whatever you would call it. But you could do this:
GameObject Copy = Instantiate(Original);
MyTextUpdater mtu = Copy.GetComponent<MyTextUpdater>();
mtu.SuperText2.Text = "Some text here";
Assuming of course that you applied the MyTextUpdater script to Original and made the right connections to the child text component.
How to use rowStyles attribute for confluence wiki markup?
Could you please provide example?
The table-plus rowStyles parameter is a comma separated list of styles. Each style is made up of one or more properties.
The first is applied to all heading rows determined by the heading parameter. The remaining styles are applied to the remaining rows in order with repetition as necessary.
Example: , background:lightyellow;, background:lightblue;
Source: https://bobswift.atlassian.net/wiki/display/TBL/Table-plus+macro
If you scroll down the page a bit there are several example tables with styles included in the wiki-markup. Hope this helps.
EDIT: Here is an example of how I added rowStyles in wiki-markup
{table-plus:border=0|align=center|cellspacing=0|cellpadding=10|class=''|title='Table One'|highlightColor=white|columnTypes=S,F,F,F|rowStyles=style="background:red;",style="background:yellow;",style="background:blue;"}
That should produce a table, titled 'Table One,' with the first row being red, the second row being yellow, and the third row being blue.