Changeset 644 for trunk/src/view_field.m


Ignore:
Timestamp:
May 28, 2013, 11:30:01 PM (11 years ago)
Author:
sommeria
Message:

various improvements: resize GUI uvmat, projection on lines

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/view_field.m

    r625 r644  
    101101%put the GUI on the lower right of the sceen
    102102pos_view_field=get(hObject,'Position');
     103set(0,'Unit','pixel')
    103104ScreenSize=get(0,'ScreenSize');
    104105pos_view_field(1)=ScreenSize(1)+ScreenSize(3)-pos_view_field(3);
     
    118119%% reset position of text_display or TableDisplay
    119120if strcmp(get(handles.TableDisplay,'Visible'),'off')
    120     pos_1=get(handles.text_display,'Position');
    121     pos_1(1)=size_fig(3)-pos_1(3);
    122     pos_1(2)=size_fig(4)-pos_1(4);
     121    pos_1=get(handles.text_display,'Position');% [lower x lower y width height] for text_display
     122    pos_1(1)=size_fig(3)-pos_1(3);             % set text display to the right of the fig
     123    pos_1(2)=size_fig(4)-pos_1(4);             % set text display to the top of the fig
    123124    set(handles.text_display,'Position',pos_1)
    124125    % reset position of TableDisplay
     
    130131end
    131132
     133%% reset position of CheckHold
     134pos_CheckHold=get(handles.CheckHold,'Position');% [lower x lower y width height] for CheckHold
     135pos_CheckHold(1)=size_fig(3)-pos_CheckHold(3);       % set 'CheckHold' to the right of the fig
     136pos_CheckHold(2)=pos_1(2)-pos_CheckHold(4);          % set 'CheckHold' to the lower edge of text display
     137set(handles.CheckHold,'Position',pos_CheckHold)
     138
    132139%% reset position of Coordinates
    133 pos_2=get(handles.Coordinates,'Position');
    134 pos_2(1)=size_fig(3)-pos_1(3);
    135 pos_2(2)=pos_1(2)-pos_2(4);
     140pos_2=get(handles.Coordinates,'Position');% [lower x lower y width height] for frame 'Coordinates'
     141pos_2(1)=size_fig(3)-pos_2(3);       % set 'Coordinates' to the right of the fig
     142pos_2(2)=pos_CheckHold(2)-pos_2(4);          % set 'Coordinates' to the lower edge of text display, allowing a margin for CheckHold
    136143set(handles.Coordinates,'Position',pos_2)
    137144
    138145%% reset position of  Scalar
    139 pos_3=get(handles.Scalar,'Position');
    140 pos_3(1)=size_fig(3)-pos_3(3);
     146pos_3=get(handles.Scalar,'Position'); % [lower x lower y width height] for frame 'Scalar'
     147pos_3(1)=size_fig(3)-pos_3(3);         % set 'Scalar' to the right of the fig
    141148if strcmp(get(handles.Scalar,'visible'),'on')
    142     pos_3(2)=pos_2(2)-pos_3(4);
     149    pos_3(2)=pos_2(2)-pos_3(4); % set 'Scalar' to the lower edge of frame 'Coordinates' if visible
    143150else
    144     pos_3(2)=pos_2(2);
     151    pos_3(2)=pos_2(2);% set 'Scalar' to the lower edge of frame 'text display' if  unvisible
    145152end
    146153set(handles.Scalar,'Position',pos_3)
     
    834841function num_ColCode2_Callback(hObject, eventdata, handles)
    835842
    836 
    837 
    838 %
    839 %
    840 % % --- Executes when view_field is resized.
    841 % function view_field_ResizeFcn(hObject, eventdata, handles)
    842 % % hObject    handle to view_field (see GCBO)
    843 % % eventdata  reserved - to be defined in a future version of MATLAB
    844 % % handles    structure with handles and user data (see GUIDATA)
    845 
    846 
    847 
    848 
Note: See TracChangeset for help on using the changeset viewer.