function varargout = ShowButtons(varargin)
% SHOWBUTTONS M-file for ShowButtons.fig
% SHOWBUTTONS, by itself, creates a new SHOWBUTTONS or raises the existing
% singleton*.
%
% H = SHOWBUTTONS returns the handle to a new SHOWBUTTONS or the handle to
% the existing singleton*.
%
% SHOWBUTTONS('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in SHOWBUTTONS.M with the given input arguments.
%
% SHOWBUTTONS('Property','Value',...) creates a new SHOWBUTTONS or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before ShowButtons_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to ShowButtons_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES

% Edit the above text to modify the response to help ShowButtons

% Last Modified by GUIDE v2.5 30-Sep-2013 21:50:54

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @ShowButtons_OpeningFcn, ...
'gui_OutputFcn', @ShowButtons_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end

if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT

% --- Executes just before ShowButtons is made visible.
function ShowButtons_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to ShowButtons (see VARARGIN)

% Choose default command line output for ShowButtons
handles.output = hObject;
% Make the button panel look nice...
set(handles.planet_Panel,'BorderType','etchedout')
set(handles.planet_Panel,'BorderWidth',6)
set(handles.planet_Panel,'highlightColor','magenta')
% The initial display is of Earth...
imshow(imread('Earth.jpg'))
set(handles.name_Box,'String','Earth')
% The quiz box will be unchecked at the start..
set(handles.quiz_Box,'Value',0);
% Update handles structure
guidata(hObject, handles);

% UIWAIT makes ShowButtons wait for user response (see UIRESUME)
% uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line.
function varargout = ShowButtons_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Get default command line output from handles structure
varargout{1} = handles.output;

% --- Executes on button press in mercury_button.
function mercury_button_Callback(hObject, eventdata, handles)
% hObject handle to mercury_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Mercury...
imshow(imread('Mercury.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Mercury')

% --- Executes on button press in venus_button.
function venus_button_Callback(hObject, eventdata, handles)
% hObject handle to venus_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Venus...
imshow(imread('Venus.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Venus')

% --- Executes on button press in earth_button.
function earth_button_Callback(hObject, eventdata, handles)
% hObject handle to earth_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Earth...
imshow(imread('Earth.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Earth')

% --- Executes on button press in mars_button.
function mars_button_Callback(hObject, eventdata, handles)
% hObject handle to mars_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Mars...
imshow(imread('Mars.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Mars')

% --- Executes on button press in jupiter_button.
function jupiter_button_Callback(hObject, eventdata, handles)
% hObject handle to jupiter_button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Jupiter...
imshow(imread('Jupiter.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Jupiter')

% --- Executes on button press in saturn_Button.
function saturn_Button_Callback(hObject, eventdata, handles)
% hObject handle to saturn_Button (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Display the Saturn...
imshow(imread('Saturn.jpg'))
% Hide the name_Box and if the quiz box is checked keep it hidden for 3
% seconds...
set(handles.name_Box,'Visible','off')
if get(handles.quiz_Box,'Value')
pause(3)
end
set(handles.name_Box,'Visible','on')
set(handles.name_Box,'String','Saturn')

function name_Box_Callback(hObject, eventdata, handles)
% hObject handle to name_Box (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of name_Box as text
% str2double(get(hObject,'String')) returns contents of name_Box as a double

% --- Executes during object creation, after setting all properties.
function name_Box_CreateFcn(hObject, eventdata, handles)
% hObject handle to name_Box (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called

% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end

% --- Executes on button press in quiz_Box.
function quiz_Box_Callback(hObject, eventdata, handles)
% hObject handle to quiz_Box (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)

% Hint: get(hObject,'Value') returns toggle state of quiz_Box