//
//  PickerView.h;汎用のルートクラス
//  X-BASIC'
//
//  Created by AIG-Soft on 2012/08/16
//  Copyright 2012-2015 AIG-Soft. All rights reserved.
//

#import <UIKit/UIKit.h>
#import "PickerView.h"

@interface PickerView : UIViewController
<UIPickerViewDelegate,UIPickerViewDataSource>
{
	IBOutlet	__weak UILabel	*lblInfo;	// 縦用
	IBOutlet	__weak UILabel	*lblInfoL;	// 横用
	//
	NSUInteger	rows;			// 項目数
	// 表示制御
	CGRect		frame0;			// 最初のサイズ；Poppoverで移動するとサイズが変わるので
	BOOL		fPortrait;		// 画面方向フラグ
	
	// オプション表示制御
	BOOL		fLblInfoHidden;
	//
	BOOL		fnextButtonHidden;
	id			nextTarget;
	SEL			nextSelector;
	//
	BOOL		fdelButtonHidden;
	id			delTarget;
	SEL			delSelector;
	
	IBOutlet	__weak UILabel *testLabel;
}
@property (nonatomic,weak) IBOutlet	UIPickerView	*pickerView;	// pickerのための画面は1つにまとめ、sourceとその結果を入れる変数を分ける
@property (nonatomic,weak) IBOutlet	UIButton		*nextButton;
@property (nonatomic,weak) IBOutlet	UIButton		*nextButtonL;
@property (nonatomic,weak) IBOutlet	UIButton		*delButton;
@property (nonatomic,weak) IBOutlet	UIButton		*delButtonL;
@property (nonatomic,strong) 		NSArray			*rowStrings;	// 項目文字列群
@property (nonatomic) 				NSUInteger		selectRow;		// 選択項目番号:それが何を意味するのかは呼び出し側が判断する

-(void)initPickerView:(id)retTarget retSelector:(SEL)retSelector title:(NSString *)title cols:(NSArray *)cols selectRow:(NSUInteger)selectRow_ btnTitle:(NSString *)btnTitle
		cancelSelector:(SEL)cancelSelector;
-(void)initPickerView:(id)retTarget retSelector:(SEL)retSelector title:(NSString *)title cols:(NSArray *)cols selectRow:(NSUInteger)selectRow_ btnTitle:(NSString *)btnTitle;
-(void)initPickerView:(id)retTarget retSelector:(SEL)retSelector title:(NSString *)title cols:(NSArray *)cols selectRow:(NSUInteger)selectRow_;
-(void)reSetPickerView:(NSArray *)cols selectRow:(NSUInteger)selectRow_;
//
-(void)setLblInfoText:(NSString *)text;
-(void)lblInfoHidden:(BOOL)fhidden;
//
-(void)setNextButtonAction:(id)target_ nextSelector:(SEL)selector_;
-(void)setNextButtonTitle:(NSString *)text;
-(IBAction)nextButtonAction:(id)sender;
-(void)nextButtonHidden:(BOOL)fhidden;
//
-(void)setDelButtonAction:(id)target_ delSelector:(SEL)selector_;
-(void)setDelButtonTitle:(NSString *)text;
-(IBAction)delButtonAction:(id)sender;
-(void)delButtonHidden:(BOOL)fhidden;

@end
