i'm new to clanlib and not that experienced in c++. although i worked with jframe from java.
so i'm trying to create a game (as a project for university) and i have a couple of problems regarding the clanlib.

1. how do i use cl_textedit? there are 2 players and i want to display their name in 2 textfields.
i adjust the value every second. i cant even initialize it, because i dont know, where to get (CL_GUIComponent *parent) from.
so a little help on how to use it would be nice.

btw: can i also use a w w for text input? i need a textfield so the user can enter the server ip and his username

2. is there a way to design a proper menu? right now i'm using enum/chars and
CL_Font_System font;
for every single text on the screen.

3. i got different draw methods for game and menu. and in the mainloop i choose the right one using a char (g = game, m = menu)
at the beginning of run() i set selected='m' but the game starts immediately.
if in the main() i put a sleep(1sec) after all the setup stuff (setupCore, setupDisplay/GL/Network) and before creating the object containing run() with the main loop,
the menu is shown properly. do i have to wait for the setups to finish? if yes, how do i check if they're done?

4. is the method to swich screen contents as described in 3. bad coded and how can i do better?