added 2 more config dialogs. examples of slider


			
			
				devs/princeamd/enlightenment-0.17-elive
			
			
		
Carsten Haitzler 17 years ago
parent 34ad3b788a
commit f7027577cc
  1. 153
      data/themes/default_slider.edc
  2. 6
      src/bin/Makefile.am
  3. 30
      src/bin/e_config.h
  4. 3
      src/bin/e_configure.c
  5. 2
      src/bin/e_includes.h
  6. 208
      src/bin/e_int_config_window_display.c
  7. 12
      src/bin/e_int_config_window_display.h
  8. 202
      src/bin/e_int_config_window_manipulation.c
  9. 12
      src/bin/e_int_config_window_manipulation.h
  10. 2
      src/bin/e_widget_slider.c
  11. 2
      src/bin/e_widget_slider.h

@ -12,37 +12,35 @@ images {
group {
name: "widgets/slider_vertical";
parts {
part {
name: "sld";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
min: 16 16;
}
}
part {
name: "sld_base";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
color: 0 0 0 0;
rel1 {
offset: 2 2;
}
rel2 {
offset: -3 -3;
}
}
description {
state: "active" 0.0;
color: 0 0 0 0;
rel1 {
offset: 2 2;
}
rel2 {
to_y: "label_over";
relative: 1.0 0.0;
offset: -1 -1;
offset: -3 -1;
}
}
}
part {
name: "sld_runner";
clip_to: "sld";
mouse_events: 0;
description {
state: "default" 0.0;
@ -106,11 +104,11 @@ group {
align: 0.5 1.0;
rel1 {
relative: 0.0 1.0;
offset: 4 -5;
offset: 7 -8;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
offset: -8 -8;
}
color: 0 0 0 255;
text {
@ -142,7 +140,7 @@ group {
rel2 {
to: "label";
relative: 1.0 1.0;
offset: 2 2;
offset: 2 3;
}
image {
normal: "e17_frame_label_over.png";
@ -156,7 +154,6 @@ group {
part {
name: "sld_p1";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
@ -171,7 +168,6 @@ group {
part {
name: "sld_p2";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
@ -209,29 +205,6 @@ group {
color: 0 0 0 0;
}
}
part {
name: "focus";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
image {
normal: "focus.png";
border: 7 7 7 7;
middle: 0;
}
fill {
smooth: 0;
}
}
description {
state: "focused" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "slider_img";
mouse_events: 0;
@ -257,6 +230,29 @@ group {
}
}
}
part {
name: "focus";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
image {
normal: "focus.png";
border: 7 7 7 7;
middle: 0;
}
fill {
smooth: 0;
}
}
description {
state: "focused" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "slider_glow";
mouse_events: 0;
@ -377,37 +373,35 @@ group {
group {
name: "widgets/slider_horizontal";
parts {
part {
name: "sld";
type: RECT;
mouse_events: 0;
description {
state: "default" 0.0;
min: 16 16;
}
}
part {
name: "sld_base";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
color: 0 0 0 0;
rel1 {
offset: 2 2;
}
rel2 {
offset: -3 -3;
}
}
description {
state: "active" 0.0;
color: 0 0 0 0;
rel1 {
offset: 2 2;
}
rel2 {
to_x: "label_over";
relative: 0.0 1.0;
offset: -1 -1;
offset: -1 -3;
}
}
}
part {
name: "sld_runner";
clip_to: "sld";
mouse_events: 0;
description {
state: "default" 0.0;
@ -471,11 +465,11 @@ group {
align: 1.0 0.5;
rel1 {
relative: 1.0 0.0;
offset: -1 4;
offset: -8 7;
}
rel2 {
relative: 1.0 1.0;
offset: -5 -5;
offset: -8 -8;
}
color: 0 0 0 255;
text {
@ -507,7 +501,7 @@ group {
rel2 {
to: "label";
relative: 1.0 1.0;
offset: 2 2;
offset: 2 3;
}
image {
normal: "e17_frame_label_over.png";
@ -521,7 +515,6 @@ group {
part {
name: "sld_p1";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
@ -536,7 +529,6 @@ group {
part {
name: "sld_p2";
type: RECT;
clip_to: "sld";
mouse_events: 1;
description {
state: "default" 0.0;
@ -551,7 +543,6 @@ group {
part {
name: "slider";
type: RECT;
clip_to: "sld";
mouse_events: 1;
dragable {
x: 1 1 0;
@ -575,29 +566,6 @@ group {
color: 0 0 0 0;
}
}
part {
name: "focus";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
image {
normal: "focus.png";
border: 7 7 7 7;
middle: 0;
}
fill {
smooth: 0;
}
}
description {
state: "focused" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "slider_img";
mouse_events: 0;
@ -623,6 +591,29 @@ group {
}
}
}
part {
name: "focus";
mouse_events: 0;
description {
state: "default" 0.0;
visible: 0;
color: 255 255 255 0;
image {
normal: "focus.png";
border: 7 7 7 7;
middle: 0;
}
fill {
smooth: 0;
}
}
description {
state: "focused" 0.0;
inherit: "default" 0.0;
visible: 1;
color: 255 255 255 255;
}
}
part {
name: "slider_glow";
mouse_events: 0;

@ -114,7 +114,9 @@ e_livethumb.h \
e_int_border_border.h \
e_widget_ilist.h \
e_slider.h \
e_widget_slider.h
e_widget_slider.h \
e_int_config_window_manipulation.h \
e_int_config_window_display.h
enlightenment_src = \
e_user.c \
@ -210,6 +212,8 @@ e_int_border_border.c \
e_widget_ilist.c \
e_slider.c \
e_widget_slider.c \
e_int_config_window_manipulation.c \
e_int_config_window_display.c \
$(ENLIGHTENMENTHEADERS)
enlightenment_SOURCES = \

@ -81,9 +81,9 @@ struct _E_Config
double menus_scroll_speed;
double menus_fast_mouse_move_threshhold;
double menus_click_drag_timeout;
int border_shade_animate;
int border_shade_transition;
double border_shade_speed;
int border_shade_animate; // GUI
int border_shade_transition; // GUI
double border_shade_speed; // GUI
double framerate;
int image_cache;
int font_cache;
@ -120,19 +120,19 @@ struct _E_Config
Evas_List *path_append_modules;
Evas_List *path_append_backgrounds;
Evas_List *path_append_input_methods;
int window_placement_policy;
int window_placement_policy; //
int focus_policy; // GUI
int focus_setting; // GUI
int pass_click_on; // GUI
int always_click_to_raise; // GUI
int always_click_to_focus; // GUI
int use_auto_raise;
double auto_raise_delay;
int use_resist;
int use_auto_raise; // GUI
double auto_raise_delay; // GUI
int use_resist; // GUI
int drag_resist;
int desk_resist;
int window_resist;
int gadget_resist;
int desk_resist; // GUI
int window_resist; // GUI
int gadget_resist; // GUI
int winlist_warp_while_selecting;
int winlist_warp_at_end;
double winlist_warp_speed;
@ -153,7 +153,7 @@ struct _E_Config
int winlist_pos_min_h;
int winlist_pos_max_w;
int winlist_pos_max_h;
int maximize_policy;
int maximize_policy; // GUI
int kill_if_close_not_possible;
int kill_process;
double kill_timer_wait;
@ -163,10 +163,10 @@ struct _E_Config
char *transition_desk;
char *transition_change;
Evas_List *remembers;
int move_info_follows;
int resize_info_follows;
int move_info_visible;
int resize_info_visible;
int move_info_follows; // GUI
int resize_info_follows; // GUI
int move_info_visible; // GUI
int resize_info_visible; // GUI
int focus_last_focused_per_desktop;
int focus_revert_on_hide_or_close;
int use_e_cursor;

@ -59,6 +59,9 @@ e_configure_show(E_Container *con)
/* add items here */
e_configure_standard_item_add(eco, "enlightenment/e", _("Focus Settings"), e_int_config_focus);
e_configure_standard_item_add(eco, "enlightenment/e", _("Window Manipulation"), e_int_config_window_manipulation);
e_configure_standard_item_add(eco, "enlightenment/e", _("Window Display"), e_int_config_window_display);
/* FIXME: we should have a way for modules to hook in here and add their
* own entries
*/

@ -95,3 +95,5 @@
#include "e_widget_ilist.h"
#include "e_slider.h"
#include "e_widget_slider.h"
#include "e_int_config_window_manipulation.h"
#include "e_int_config_window_display.h"

@ -0,0 +1,208 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* PROTOTYPES - same all the time */
typedef struct _CFData CFData;
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
/* Actual config data we will be playing with whil the dialog is active */
struct _CFData
{
/*- BASIC -*/
int move_resize_info;
int animate_shading;
int placement;
/*- ADVANCED -*/
int window_placement_policy;
int move_info_visible;
int move_info_follows;
int resize_info_visible;
int resize_info_follows;
int border_shade_animate;
int border_shade_transition;
double border_shade_speed;
};
/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
e_int_config_window_display(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View v;
/* methods */
v.create_cfdata = _create_data;
v.free_cfdata = _free_data;
v.basic.apply_cfdata = _basic_apply_data;
v.basic.create_widgets = _basic_create_widgets;
v.advanced.apply_cfdata = _advanced_apply_data;
v.advanced.create_widgets = _advanced_create_widgets;
/* create config diaolg for NULL object/data */
cfd = e_config_dialog_new(con, _("Window Display"), NULL, 0, &v, NULL);
return cfd;
}
/**--CREATE--**/
static void
_fill_data(CFData *cfdata)
{
cfdata->window_placement_policy = e_config->window_placement_policy;
cfdata->move_info_visible = e_config->move_info_visible;
cfdata->move_info_follows = e_config->move_info_follows;
cfdata->resize_info_visible = e_config->resize_info_visible;
cfdata->resize_info_follows = e_config->resize_info_follows;
cfdata->border_shade_animate = e_config->border_shade_animate;
cfdata->border_shade_transition = e_config->border_shade_transition;
cfdata->border_shade_speed = e_config->border_shade_speed;
if (cfdata->move_info_visible ||
cfdata->resize_info_follows) cfdata->move_resize_info = 1;
if (cfdata->border_shade_animate) cfdata->animate_shading = 1;
cfdata->placement = cfdata->window_placement_policy;
}
static void *
_create_data(E_Config_Dialog *cfd)
{
/* Create cfdata - cfdata is a temporary block of config data that this
* dialog will be dealing with while configuring. it will be applied to
* the running systems/config in the apply methods
*/
CFData *cfdata;
cfdata = E_NEW(CFData, 1);
_fill_data(cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Free the cfdata */
free(cfdata);
}
/**--APPLY--**/
static int
_basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
if (cfdata->move_resize_info)
{
e_config->move_info_visible = 1;
e_config->resize_info_visible = 1;
}
e_config->window_placement_policy = cfdata->placement;
e_config->border_shade_animate = cfdata->animate_shading;
e_config_save_queue();
return 1; /* Apply was OK */
}
static int
_advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
e_config->window_placement_policy = cfdata->window_placement_policy;
e_config->move_info_visible = cfdata->move_info_visible;
e_config->move_info_follows = cfdata->move_info_follows;
e_config->resize_info_visible = cfdata->resize_info_visible;
e_config->resize_info_follows = cfdata->resize_info_follows;
e_config->border_shade_animate = cfdata->border_shade_animate;
e_config->border_shade_transition = cfdata->border_shade_transition;
e_config->border_shade_speed = cfdata->border_shade_speed;
e_config_save_queue();
return 1; /* Apply was OK */
}
/**--GUI--**/
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
{
/* generate the core widget layout for a basic dialog */
Evas_Object *o, *of, *ob;
E_Radio_Group *rg;
_fill_data(cfdata);
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Display"), 0);
ob = e_widget_check_add(evas, _("Show window geometry information when moving or resizing"), &(cfdata->move_resize_info));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Animate the shading and unshading of windows"), &(cfdata->animate_shading));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Automatic New Window Placement"), 0);
rg = e_widget_radio_group_new(&(cfdata->placement));
ob = e_widget_radio_add(evas, _("Smart Placement"), E_WINDOW_PLACEMENT_SMART, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Place at mouse pointer"), E_WINDOW_PLACEMENT_CURSOR, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Place manually with the mouse"), E_WINDOW_PLACEMENT_MANUAL, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}
static Evas_Object *
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
{
/* generate the core widget layout for an advanced dialog */
Evas_Object *o, *ob, *of, *of2;
E_Radio_Group *rg;
_fill_data(cfdata);
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Window Move Geometry"), 0);
ob = e_widget_check_add(evas, _("Display information"), &(cfdata->move_info_visible));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Follow the window as it moves"), &(cfdata->move_info_follows));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Window Resize Geometry"), 0);
ob = e_widget_check_add(evas, _("Display information"), &(cfdata->resize_info_visible));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("Follow the window as it resizes"), &(cfdata->resize_info_follows));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Window Shading"), 0);
ob = e_widget_check_add(evas, _("Animate shading and unshading of windows"), &(cfdata->border_shade_animate));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%4.0f pixels/sec"), 100, 9900, 100, 0, &(cfdata->border_shade_speed), NULL, 200);
e_widget_framelist_object_append(of, ob);
rg = e_widget_radio_group_new(&(cfdata->border_shade_transition));
ob = e_widget_radio_add(evas, _("Linear"), E_TRANSITION_LINEAR, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Smooth accelerate and decelerate"), E_TRANSITION_SINUSOIDAL, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Accelerate"), E_TRANSITION_ACCELERATE, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Decelerate"), E_TRANSITION_DECELERATE, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Automatic New Window Placement"), 0);
rg = e_widget_radio_group_new(&(cfdata->placement));
ob = e_widget_radio_add(evas, _("Smart Placement"), E_WINDOW_PLACEMENT_SMART, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Place at mouse pointer"), E_WINDOW_PLACEMENT_CURSOR, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Place manually with the mouse"), E_WINDOW_PLACEMENT_MANUAL, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}

@ -0,0 +1,12 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_CONFIG_WINDOW_DISPLAY_H
#define E_INT_CONFIG_WINDOW_DISPLAY_H
EAPI E_Config_Dialog *e_int_config_window_display(E_Container *con);
#endif
#endif

@ -0,0 +1,202 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#include "e.h"
/* PROTOTYPES - same all the time */
typedef struct _CFData CFData;
static void *_create_data(E_Config_Dialog *cfd);
static void _free_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static int _advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata);
static Evas_Object *_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
static Evas_Object *_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata);
/* Actual config data we will be playing with whil the dialog is active */
struct _CFData
{
/*- BASIC -*/
int auto_raise;
int resist;
int maximize;
/*- ADVANCED -*/
int use_auto_raise;
double auto_raise_delay;
int use_resist;
int desk_resist;
int window_resist;
int gadget_resist;
int maximize_policy;
};
/* a nice easy setup function that does the dirty work */
E_Config_Dialog *
e_int_config_window_manipulation(E_Container *con)
{
E_Config_Dialog *cfd;
E_Config_Dialog_View v;
/* methods */
v.create_cfdata = _create_data;
v.free_cfdata = _free_data;
v.basic.apply_cfdata = _basic_apply_data;
v.basic.create_widgets = _basic_create_widgets;
v.advanced.apply_cfdata = _advanced_apply_data;
v.advanced.create_widgets = _advanced_create_widgets;
/* create config diaolg for NULL object/data */
cfd = e_config_dialog_new(con, _("Window Manipulation"), NULL, 0, &v, NULL);
return cfd;
}
/**--CREATE--**/
static void
_fill_data(CFData *cfdata)
{
cfdata->use_auto_raise = e_config->use_auto_raise;
cfdata->auto_raise_delay = e_config->auto_raise_delay;
cfdata->use_resist = e_config->use_resist;
cfdata->desk_resist = e_config->desk_resist;
cfdata->window_resist = e_config->window_resist;
cfdata->gadget_resist = e_config->gadget_resist;
cfdata->maximize_policy = e_config->maximize_policy;
if (cfdata->maximize_policy == E_MAXIMIZE_NONE)
cfdata->maximize_policy = E_MAXIMIZE_FULLSCREEN;
if (cfdata->use_auto_raise) cfdata->auto_raise = 1;
if (cfdata->use_resist) cfdata->resist = 1;
cfdata->maximize = cfdata->maximize_policy;
}
static void *
_create_data(E_Config_Dialog *cfd)
{
/* Create cfdata - cfdata is a temporary block of config data that this
* dialog will be dealing with while configuring. it will be applied to
* the running systems/config in the apply methods
*/
CFData *cfdata;
cfdata = E_NEW(CFData, 1);
_fill_data(cfdata);
return cfdata;
}
static void
_free_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Free the cfdata */
free(cfdata);
}
/**--APPLY--**/
static int
_basic_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
e_config->use_auto_raise = cfdata->auto_raise;
cfdata->use_resist = cfdata->resist;
e_config->maximize_policy = cfdata->maximize;
e_config_save_queue();
return 1; /* Apply was OK */
}
static int
_advanced_apply_data(E_Config_Dialog *cfd, CFData *cfdata)
{
/* Actually take our cfdata settings and apply them in real life */
e_config->use_auto_raise = cfdata->use_auto_raise;
e_config->auto_raise_delay = cfdata->auto_raise_delay;
e_config->use_resist = cfdata->use_resist;
e_config->desk_resist = cfdata->desk_resist;
e_config->window_resist = cfdata->window_resist;
e_config->gadget_resist = cfdata->gadget_resist;
e_config->maximize_policy = cfdata->maximize_policy;
e_config_save_queue();
return 1; /* Apply was OK */
}
/**--GUI--**/
static Evas_Object *
_basic_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
{
/* generate the core widget layout for a basic dialog */
Evas_Object *o, *of, *ob;
E_Radio_Group *rg;
_fill_data(cfdata);
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Miscellaneous Options"), 0);
ob = e_widget_check_add(evas, _("Automatically raise windows on mouse over"), &(cfdata->auto_raise));
e_widget_framelist_object_append(of, ob);
ob = e_widget_check_add(evas, _("When moving or resizing windows, resist at the boundaries"), &(cfdata->resist));
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Maximize Policy"), 0);
rg = e_widget_radio_group_new(&(cfdata->maximize));
ob = e_widget_radio_add(evas, _("Fullscreen"), E_MAXIMIZE_FULLSCREEN, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Smart expansion"), E_MAXIMIZE_SMART, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Expand the window"), E_MAXIMIZE_EXPAND, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Fill available space"), E_MAXIMIZE_FILL, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}
static Evas_Object *
_advanced_create_widgets(E_Config_Dialog *cfd, Evas *evas, CFData *cfdata)
{
/* generate the core widget layout for an advanced dialog */
Evas_Object *o, *ob, *of;
E_Radio_Group *rg;
_fill_data(cfdata);
o = e_widget_list_add(evas, 0, 0);
of = e_widget_framelist_add(evas, _("Autoraise"), 0);
ob = e_widget_check_add(evas, _("Automatically raise windows on mouse over"), &(cfdata->use_auto_raise));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Delay before raising:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%1.1f sec"), 0.0, 9.9, 0.1, 0, &(cfdata->auto_raise_delay), NULL, 200);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Resistance"), 0);
ob = e_widget_check_add(evas, _("Resist moving or resizing a window over an obstacle"), &(cfdata->use_resist));
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Resistance between windows:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 64.0, 1.0, 0, NULL, &(cfdata->window_resist), 200);
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Resistance at the edge of the screen:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 64.0, 1.0, 0, NULL, &(cfdata->desk_resist), 200);
e_widget_framelist_object_append(of, ob);
ob = e_widget_label_add(evas, _("Resistance to desktop gadgets:"));
e_widget_framelist_object_append(of, ob);
ob = e_widget_slider_add(evas, 1, 0, _("%2.0f pixels"), 0, 64.0, 1.0, 0, NULL, &(cfdata->gadget_resist), 200);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
of = e_widget_framelist_add(evas, _("Maximize Policy"), 0);
rg = e_widget_radio_group_new(&(cfdata->maximize_policy));
ob = e_widget_radio_add(evas, _("Fullscreen"), E_MAXIMIZE_FULLSCREEN, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Smart expansion"), E_MAXIMIZE_SMART, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Expand the window"), E_MAXIMIZE_EXPAND, rg);
e_widget_framelist_object_append(of, ob);
ob = e_widget_radio_add(evas, _("Fill available space"), E_MAXIMIZE_FILL, rg);
e_widget_framelist_object_append(of, ob);
e_widget_list_object_append(o, of, 1, 1, 0.5);
return o;
}

@ -0,0 +1,12 @@
/*
* vim:ts=8:sw=3:sts=8:noexpandtab:cino=>5n-3f0^-2{2
*/
#ifdef E_TYPEDEFS
#else
#ifndef E_INT_CONFIG_WINDOW_MANIPULATION_H
#define E_INT_CONFIG_WINDOW_MANIPULATION_H
EAPI E_Config_Dialog *e_int_config_window_manipulation(E_Container *con);
#endif
#endif

@ -41,10 +41,10 @@ e_widget_slider_add(Evas *evas, int horiz, int rev, char *fmt, double min, doubl
e_slider_orientation_set(o, horiz);
e_slider_direction_set(o, rev);
e_slider_value_range_set(o, min, max);
e_slider_value_format_display_set(o, fmt);
e_slider_value_step_count_set(o, count);
e_slider_value_step_size_set(o, step);
e_slider_value_range_set(o, min, max);
if (dval) e_slider_value_set(o, *dval);
else if (ival) e_slider_value_set(o, *ival);

@ -6,7 +6,7 @@
#ifndef E_WIDGET_SLIDER_H
#define E_WIDGET_SLIDER_H
EAPI Evas_Object *e_widget_slider_add(Evas *evas, int horiz, int rev, char *fmt, double min, double max, double step, int count, double *dval, int *ival, Evas_Coord sizex);
EAPI Evas_Object *e_widget_slider_add(Evas *evas, int horiz, int rev, char *fmt, double min, double max, double step, int count, double *dval, int *ival, Evas_Coord size);
#endif
#endif

Loading…
Cancel
Save