exposurses

Check-in [328662366f]
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Test using the User Pointer to change another menu

Requires the Window and Menu variables to be global(?) in scope. I.e.
move outside of main routine.

Interesting thing about the refreshing of the other menu...

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 328662366f6b5a1d9364cb6000cd4da6e99fc845f118f235d5aa9183f7976f3d
User & Date: atomicules@lavabit.com 2013-07-11 12:06:01
Context
2013-07-13
22:13
Make "make clean" actually clean everything check-in: 7c39adc01d user: atomicules@lavabit.com tags: origin/master, trunk
2013-07-11
12:06
Test using the User Pointer to change another menu

Requires the Window and Menu variables to be global(?) in scope. I.e.
move outside of main routine.

Interesting thing about the refreshing of the other menu... check-in: 328662366f user: atomicules@lavabit.com tags: origin/master, trunk

2013-07-10
13:14
Add initial usage of the User Pointer

Still need a way to get to the third menu and also need to actually do
something with the User Pointer function.

Baby steps though. check-in: b4468458f4 user: atomicules@lavabit.com tags: origin/master, trunk

Changes
Hide Diffs Unified Diffs Show Whitespace Changes Patch

Changes to exposurses.c.

37
38
39
40
41
42
43










44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
	"f/4",
	"f/5.6",
	"f/8",
	"f/11",
	"f/16"
};











void selection(char *name);
void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color);

int main(){
	ITEM **iso_items;
	ITEM **shutter_items;
	ITEM **aperture_items;
	int c;
	MENU *iso_menu;
	MENU *shutter_menu;
	MENU *aperture_menu;
	MENU **menu;
	WINDOW *iso_win;
	WINDOW *shutter_win;
	WINDOW *aperture_win;
	WINDOW **win;
	int n_iso, i;
	int n_shutter, j;
	int n_aperture, k;

	/* Initialize curses */
	initscr();







>
>
>
>
>
>
>
>
>
>




<
<
<

<
<
<

<
<
<







37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57



58



59



60
61
62
63
64
65
66
	"f/4",
	"f/5.6",
	"f/8",
	"f/11",
	"f/16"
};

ITEM **iso_items;
ITEM **shutter_items;
ITEM **aperture_items;
MENU *iso_menu;
MENU *shutter_menu;
MENU *aperture_menu;
WINDOW *iso_win;
WINDOW *shutter_win;
WINDOW *aperture_win;

void selection(char *name);
void print_in_middle(WINDOW *win, int starty, int startx, int width, char *string, chtype color);

int main(){



	int c;



	MENU **menu;



	WINDOW **win;
	int n_iso, i;
	int n_shutter, j;
	int n_aperture, k;

	/* Initialize curses */
	initscr();
223
224
225
226
227
228
229
230
231
232




233
234
	wattron(win, color);
	mvwprintw(win, y, x, "%s", string);
	wattroff(win, color);
	refresh();
}

void selection(char *name) {
	/* For now let's just print something */
	move(0, 0);
	clrtoeol();




	mvprintw(0, 0, "Item selected is : %s", name);
}







|
|
|
>
>
>
>
|

224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
	wattron(win, color);
	mvwprintw(win, y, x, "%s", string);
	wattroff(win, color);
	refresh();
}

void selection(char *name) {
	/* Test setting item in another menu */
	set_top_row(shutter_menu, 3);
	/* This works, but plain refreshing doesn't work properly */
	/* But cheating and using menu_driver to go up/down does */
	menu_driver(shutter_menu, REQ_DOWN_ITEM);
	menu_driver(shutter_menu, REQ_UP_ITEM);
	wrefresh(shutter_win);
	
}