exposurses

Check-in [338867e3ed]
Login

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

Overview
Comment:Tweak menu widths, make future adjustment more flexible
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | origin/master | trunk
Files: files | file ages | folders
SHA3-256: 338867e3edc36701444059739ce038a595e4ef9de24074290078d5ea988dc369
User & Date: base@atomicules.co.uk 2013-09-18 14:21:27
Context
2013-09-18
21:35
Add screenshot to README check-in: 2a307b38c7 user: base@atomicules.co.uk tags: origin/master, trunk
14:21
Tweak menu widths, make future adjustment more flexible check-in: 338867e3ed user: base@atomicules.co.uk tags: origin/master, trunk
13:34
Remove some spurious trailing tabs check-in: fee7533a30 user: base@atomicules.co.uk tags: origin/master, trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to exposurses.c.

104
105
106
107
108
109
110


111
112
113
114
115
116
117
...
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
...
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
/* No one will ever need more than 9 bytes! */
char exposure_sel[9] = "";
char iso_sel[9] = "";
char shutter_sel[9] = "";
char aperture_sel[9] = "";
int selection_counter = 1;
int menu_counter = 1;



int main() {
	int c;
	MENU **menu;
	WINDOW **win;
	int i;
	int n_exposure;
................................................................................
	aperture_items = add_item(aperture_array, n_aperture);
	shutter_items = add_item(shutter_array, n_shutter);
	exposure_menu = add_menu(exposure_items);
	iso_menu = add_menu(iso_items);
	shutter_menu = add_menu(shutter_items);
	aperture_menu = add_menu(aperture_items);
	exposure_win = add_window(4, "EV");
	iso_win = add_window(45, "ISO");
	shutter_win = add_window(86, "Shutter");
	aperture_win = add_window(127, "Aperture");
	/* Don't know how to avoid the repition below */
	set_menu_win(exposure_menu, exposure_win);
	set_menu_win(iso_menu, iso_win);
	set_menu_win(shutter_menu, shutter_win);
	set_menu_win(aperture_menu, aperture_win);
	set_menu_sub(exposure_menu, derwin(exposure_win, 6, 38, 3, 1));
	set_menu_sub(iso_menu, derwin(iso_win, 6, 38, 3, 1));
	set_menu_sub(shutter_menu, derwin(shutter_win, 6, 38, 3, 1));
	set_menu_sub(aperture_menu, derwin(aperture_win, 6, 38, 3, 1));
	post_menu(exposure_menu);
	post_menu(iso_menu);
	post_menu(shutter_menu);
	post_menu(aperture_menu);
	wrefresh(exposure_win);
	wrefresh(iso_win);
	wrefresh(shutter_win);
................................................................................
	set_menu_mark(local_menu, " * ");
	return local_menu;
}

WINDOW *add_window(int xpos, char *title) {
	WINDOW *local_win;

	local_win = newwin(10, 40, 4, xpos);
	keypad(local_win, TRUE);
	box(local_win, 0, 0);
	print_in_middle(local_win, 1, 0, 40, title, COLOR_PAIR(1));
	mvwaddch(local_win, 2, 0, ACS_LTEE);
	mvwhline(local_win, 2, 1, ACS_HLINE, 38);
	mvwaddch(local_win, 2, 39, ACS_RTEE);
	return local_win;
}

void remove_menu(ITEM **items, MENU *men, int n) {
	int i;

	unpost_menu(men);







>
>







 







|
|
|
|




|
|
|
|







 







|


|

|
|







104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
...
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
...
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
/* No one will ever need more than 9 bytes! */
char exposure_sel[9] = "";
char iso_sel[9] = "";
char shutter_sel[9] = "";
char aperture_sel[9] = "";
int selection_counter = 1;
int menu_counter = 1;
int menu_width = 25;
int menu_padding = 3;

int main() {
	int c;
	MENU **menu;
	WINDOW **win;
	int i;
	int n_exposure;
................................................................................
	aperture_items = add_item(aperture_array, n_aperture);
	shutter_items = add_item(shutter_array, n_shutter);
	exposure_menu = add_menu(exposure_items);
	iso_menu = add_menu(iso_items);
	shutter_menu = add_menu(shutter_items);
	aperture_menu = add_menu(aperture_items);
	exposure_win = add_window(4, "EV");
	iso_win = add_window(4 + menu_width + menu_padding, "ISO");
	shutter_win = add_window(4 + 2*(menu_width + menu_padding), "Shutter");
	aperture_win = add_window(4 + 3*(menu_width + menu_padding), "Aperture");
	/* Don't know how to avoid the repetion below */
	set_menu_win(exposure_menu, exposure_win);
	set_menu_win(iso_menu, iso_win);
	set_menu_win(shutter_menu, shutter_win);
	set_menu_win(aperture_menu, aperture_win);
	set_menu_sub(exposure_menu, derwin(exposure_win, 6, menu_width, 3, 1));
	set_menu_sub(iso_menu, derwin(iso_win, 6, menu_width, 3, 1));
	set_menu_sub(shutter_menu, derwin(shutter_win, 6, menu_width, 3, 1));
	set_menu_sub(aperture_menu, derwin(aperture_win, 6, menu_width, 3, 1));
	post_menu(exposure_menu);
	post_menu(iso_menu);
	post_menu(shutter_menu);
	post_menu(aperture_menu);
	wrefresh(exposure_win);
	wrefresh(iso_win);
	wrefresh(shutter_win);
................................................................................
	set_menu_mark(local_menu, " * ");
	return local_menu;
}

WINDOW *add_window(int xpos, char *title) {
	WINDOW *local_win;

	local_win = newwin(10, menu_width+2, 4, xpos);
	keypad(local_win, TRUE);
	box(local_win, 0, 0);
	print_in_middle(local_win, 1, 0, menu_width+2, title, COLOR_PAIR(1));
	mvwaddch(local_win, 2, 0, ACS_LTEE);
	mvwhline(local_win, 2, 1, ACS_HLINE, menu_width);
	mvwaddch(local_win, 2, menu_width+1, ACS_RTEE);
	return local_win;
}

void remove_menu(ITEM **items, MENU *men, int n) {
	int i;

	unpost_menu(men);